Event Keyword
Used to declare a user defined event.
It is possible for a user defined class to raise an event when a specific action or condition occurs.
You cannot declare events in a standard code module.
Event names cannot contain underscores ?
Declaration
Cannot include underscores in your variable name
Arguments are optional
Public Event myEventName
Public Event myEventName(ByVal myArgument As String)
Public Event BeforeClose(ByRef Cancel As Boolean)
Triggering the Event
Once the event has been declared you can trigger it from inside the corresponding class module.
RaiseEvent myEventName
© 2024 Better Solutions Limited. All Rights Reserved. © 2024 Better Solutions Limited TopPrevNext