Change a buton "Caption" from VBA

  • Thread starter Thread starter 0000_AAAA_0000
  • Start date Start date
0

0000_AAAA_0000

Hi!

and Many Thanks in Advance!


If i have a commandBoton; to change his caption
all I have to do is:

Sub AAA()
With ActiveSheet.CommandButton1
.Caption = "NewName"
End With
End Sub



but:

how can I change a Button name when is not a CommandBoton but a Buto
from the form Toolbar
 
ActiveSheet.Shapes("Name of Button").TextFrame.Characters.Text
"Testing 123
 
Assume rather than change the button's name, I assume you mean you want to
change the caption (what is displayed on the button).

Activesheet.buttons("ButtonName").Caption = "ABCD"

would be another way (perhaps more direct).
 

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