View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
LPS LPS is offline
external usenet poster
 
Posts: 108
Default How to pass the name of the cmdbutton calling an Excel VBA procedu

I would like to have multiple command buttons call a single procedure and
that procedure displays a msgbox that shows the name of the button which
called it.

Can anyone help with the correct code? I've tried several things that have
not worked. The only solution I came up with is having the 'click' method of
the buttons call the single procedure and pass the name as a variable. the
problem with this if I expland the scenario to 20+ command buttons, there is
a lot of excess 'click' method code which seems redundant.

Thanks in advance for any help.