I see that there are BeforeDelete events in MS Office applications. If these events are set to false you can stop the program from deleting a value, page, document, or whatever event this event is fired before.

I was wondering how I couldcreate an event like this? I have a class that, of course, adds data to a collection. I want to be able to fire a BeforeAdd event that will wait for a cancel boolean. This way I will be able to validate my data in different ways and makes this class more rebust between applications.


Thanks all!