How to get an ActiveButton name?

  • Thread starter Thread starter Arie Sukendro
  • Start date Start date
A

Arie Sukendro

Hi,
I'm looking for a code to get the activebutton name.
(When I click a button, the macro will pop up a message box showing the
button's name)
Can somebody help?

Thanks,
Arie
 
Is the button from the Forms toolbar?

msgbox application.caller

And if you're looking to do more things with that button:

dim myBTN as button
set myBTN = activesheet.buttons(application.caller)
msgbox mybtn.topleftcell.address 'and more stuff
 
Back
Top