Link to home
Start Free TrialLog in
Avatar of manne
manne

asked on

Withevents

If I skip the Event RenameNode row I get the error message Object does not source Automation events. Why is this row necessary?

==form code (a form with a treeview)
Option Explicit

Dim WithEvents urban As nisse

Private Sub Form_Load()
     Set urban = New nisse
     urban.init TreeView1
End Sub

=class code
Option Explicit

Private WithEvents TV As ComctlLib.treeview
?Event RenameNode(Data As Variant, NewName As String, Cancel As Integer)

Sub init(treeview As ComctlLib.treeview)
    Set TV = treeview
End Sub
Private Sub TV_Click()
    MsgBox "hej"
End Sub
ASKER CERTIFIED SOLUTION
Avatar of johnny_5
johnny_5

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial