If the command button is from the Controls tool bar, use code
like
Worksheets("Sheet1").OLEObjects("CommandButton1"). Object.Caption
= "Text"
If the command button is from the Forms tool bar, use code like
Worksheets("Sheet1").Buttons("Button 1").Text = "Test"
--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
"jimx " wrote in message
...
how do you change a property of a command button that is on
sheet 1 of
excel worksheet FROM subroutine in vba?
does the command button have the same properties like in visual
basic?
ex:
sub change()
command.caption = "button1"
command.top = 900
end sub
??
thank you
---
Message posted from http://www.ExcelForum.com/