buttons

S

sausepan

When I click a control button, I want to assigned macro
to recognize the button's name. Any ideas how?
 
F

ForSale

You mean like have the button call the macro
Private Sub CommandButton1_Click()
Call Macro1
End Su
 
S

sausepan

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
 
F

ForSale

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
 
Top