Example: event
In this example,
Click
and TextChanged
events are selected on the Events
tab, and then the VBA code triggers corresponding event actions.Private Sub Button1_Released()
DotNetControl1.SetPropertyValue "Text", "This is a button." 'The property type is String
End Sub
Private Sub DotNetControl1_OnEvent(ByVal eventName As String, ByVal eventParametersJson As String)
If eventName = "Click" ThenMsgBox "You click the button."
ElseIf eventName = "TextChanged" ThenMsgBox "You change the button text."
End If
End Sub
Provide Feedback