Sub Button_Action
Dim Btn As Button = Sender
Dim Text As String = Btn.Text.Replace(" ", "_")
LogDebug("Sub_" & Text)
If SubExists(Me, Text) Then CallSub(Me, Text)
End Sub
The above code won't work when I click on any of the buttons I have on my form. Any ideas?
You can process all button action event in one Action event if you set a different tag property to each button, and set the same event to all buttons
Later in the Event, get the sender (as you did) and check the text tag in a Select Case to decide which button has fired the event, and set the properly code to each button action