I\'ve written some code to handle an event as follows:
AddHandler myObject.myEvent, AddressOf myFunction
It seemed that everything was work
I know this is an old post but just wanted to add a solution for those who come looking in this direction...
VB.Net creates a special private member variable in the pattern of
that you can then use to test against Nothing.
Public Event MyClick As EventHandler
Private Sub OnMyClick()
If MyClickEvent IsNot Nothing Then
RaiseEvent MyClick(Me, New EventArgs())
Else
' No event handler has been set.
MsgBox("There is no event handler. That makes me sad.")
End If
End Sub
Answer sourced from here: Determine if an event has been attached to yet