1 sub for multiple events

Simontelescopium

Member
Licensed User
Hi is it possible to have one sub manage multiple events?
i.e. I have some code
Sub ib0_click
move=0
checkplay
End Sub

Sub ib1_click
move=1
checkplay
End Sub

Sub ib2_click
move=2
checkplay
End Sub

and so on for 52 seperate events, where ib1,ib2,ib3,ibx... are imagebuttons

Is there a way to combine these into a single sub that could manage all the click events for all the image buttons, by somehow identifying the control that triggered the event?
 

wolfgang

Member
Licensed User
Longtime User
Hi,
maybe something like this (example with 5 buttons)?
 

Attachments

  • multisub.sbp
    1.1 KB · Views: 188
Cookies are required to use this site. You must accept them to continue using the site. Learn more…