Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
excel, vba, command button
how do you change a property of a command button that is on sheet 1 o
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 yo -- Message posted from http://www.ExcelForum.com |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
excel, vba, command button
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/ |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
excel, vba, command button
worksheets("Sheet1").CommandButton1.Caption = "button1"
Worksheets("Sheet1").CommandButton1.Top = 900 most properties are the same. -- Regards, Tom Ogilvy "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/ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Command Button Excel 2007 | Excel Discussion (Misc queries) | |||
command button a word document in excel | Excel Worksheet Functions | |||
Command Button to store a value in Excel/VBA....... | Excel Discussion (Misc queries) | |||
adding a command button to an excel cell? | Excel Discussion (Misc queries) | |||
command button in excel will move when print. | Excel Discussion (Misc queries) |