I am trying to create an excel template where I have already assigned different macros to different shape that act as buttons. Now I am having problem of locating which one I have clicked since I need to modify the attributes of the clicked shape after clicking on that shape. While searching on this problem, I have noticed that there is a way to identify which shape has been selected whereas I still doesn't know How to get the name of the shape I have clicked or is there a way to refer to that clicked shape in VBA? Thank you!
You should be able to get the name of the clicked shape by using Application.Caller
usage as shown
'Application.Caller contains a reference to the clicked Shape
msgbox Application.Caller.Name
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With