Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Raise class event from Intitialise event

Status
Not open for further replies.

kiwiCoder

Technical User
Aug 2, 2001
45
0
0
NZ
Is there a way that I can raise an event of my own from the class initialise event. Ie My class is named Util, I need to have a Util_initialise event of my own that is raised when the class initialise event is raised.
 
Sure, although I can't see why you would want to. After all, if an event is always raised by another event, then why can't you just include the code for the raised event in the raising event?

To raise an event, just declare the event in the general declarations section, and then use the RaiseEvent keyword. Also, you have to use the WithEvents keyword when you are declaring your object variable.

Bob
 
why is it the obvious eludes us.
Thanks

If you love your job you never have to work again.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top