I wanted to assign some specific actions when clicking on one of the images I have inserted in my Excel sheet. The problem is, I got 52 images (Poker cards for those wondering). So, my question is, is there any way to avoid writing code for 52 cases, and find a way like below:
Private Sub Image(x)_Click()
Call common_subroutine(x)
End Sub
, instead of writing the same thing 52 times, one for each different image name? Since I use the same subroutine to do the work with a variable according to the case, the load of work won't be that big if there's no way to do it, but it surely bothers me whether this obviously silly way is the only one possible.