Events

Standard code modules have no way of handling events.
Class modules can expose events.


Declare Custom Events

Class Class_One 

Public Event event_Name(ByVal myArgument As String)
Public Event event_BeforeClose(ByRef Cancel As Boolean)

Raising the Event

Class Class_One 

Public Sub Method_Something
   RaiseEvent event_Name("text")

   Dim bcancel As Boolean
   RaiseEvent event_BeforeClose(bcancel)
   If (bcancel = True) Then
   End If
End Sub

© 2024 Better Solutions Limited. All Rights Reserved. © 2024 Better Solutions Limited TopPrevNext