button labelling

  • Thread starter anisha via OfficeKB.com
  • Start date
A

anisha via OfficeKB.com

I am a beginner, so please help..., though it may be looking very simple to
you dt. 27/10/09

below is a macro DA which creates a button which on clicking will execute the
macro called DAmacro
How can i give a label to this button (eg. label "OK DAMACRO"). Now button1,
button2 etc. is appearing as label
Sub DA()
Dim myButton As Button
Set myButton = ActiveSheet.Buttons. _
Add(Left:=3, Top:=2, Height:=25, Width:=45)
myButton.OnAction = "DAmacro"
End Sub


Many many thanks in advance
 
J

joel

The caption property

Sub DA()
Dim myButton As Button
Set myButton = ActiveSheet.Buttons. _
Add(Left:=3, Top:=2, Height:=25, Width:=45)
myButton.OnAction = "DAmacro"
myButton.Caption = "DAmacro"
End Su
 

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

Top