I am trying to change the label of a command button using code and cant get it to work.
This is the code i am trying is
but it wont work can you help.![]()
Sheets("Menu").CommandButton2.Lable = sunlb
I am trying to change the label of a command button using code and cant get it to work.
This is the code i am trying is
but it wont work can you help.![]()
Sheets("Menu").CommandButton2.Lable = sunlb
Last edited by VBA Noob; 02-08-2008 at 06:48 PM.
Hello stoney1977,
Since there are 2 types of Command Buttons, I show you both methods.
Sincerely,![]()
'Control Toolbox Command Button Set CmdBtn = ActiveSheet.OLEObjects("CommandButton1").Object CmdBtn.Caption = "Hello" 'Forms Control Command Button ActiveSheet.Buttons("Button 1").Caption = "Hello"
Leith Ross
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks