VB6, : WithEvents . , , , , Nothing. , / , .
Dim MyObject As MyClass
Dim WithEvents MyObjectEvents As MyClass
Public Sub MyObjectEvents_EventName()
MsgBox "Received event"
End Sub
Private Sub Subscribe()
Set MyObjectEvents = MyObject
End Sub
Private Sub Unsubscribe()
Set MyObjectEvents = Nothing
End Sub