WISH Multiple sub options

MikeH

Well-Known Member
Licensed User
Longtime User
I`m not sure if this already exists. I searched but didn`t know what to search for, how to describe it.

Suppose you have more than one button/panel/whatever that calls the same sub. Presently you have to:

Code: Copy
Sub Button1_click
SUB1
End Sub

Sub Panel1_Click
SUB1
End Sub

Sub Image1_Click
SUB1
End Sub

SUB1
Do Something
End Sub

Would it be possible to do this instead:

Code: Copy
Sub Button1_click, Panel1_Click, Image1_Click
SUB1
End Sub

SUB1
Do Something
End Sub


Thanks in advance :)
 
Yes you can.
Set the EventName property of the three views to "View".
Either in the Designer or in the code when you initialize the views.

Then you can have
Code: Copy
Sub View_Click
    Sub1
End Sub

Sub Sub1
    ' do something
End Sub
Best regards.
 
Thanks Klaus.

Now I know how to use Event Name :)
 
Back
Top