buttons

  • Thread starter Thread starter sausepan
  • Start date Start date
S

sausepan

When I click a control button, I want to assigned macro
to recognize the button's name. Any ideas how?
 
You mean like have the button call the macro
Private Sub CommandButton1_Click()
Call Macro1
End Su
 
I mean that if the button is named "delete 1" that the
macro can identify the button name.....ie.
x = button name
range ("a1").value = x
 
not tested, but try something like.
range("a1").value = delete1.name

i don't believe that you can have a space in the name of a button, d
you mean the caption? if you want it to return the caption try:
range("a1").value = commandbutton1.captio
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top