Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Refer to a control name from another sheet
Dear experts,
I embed a command button on sheet1 on a an excel workbook. I'd like to change it's 'enabled' property at run time from a code in sheet2. How can I refer to it's name? (ex. 'worksheets(1).commandbutton.enabled =false' doesn't work) Regards, reza |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Refer to a control name from another sheet
Sure it's called "commandbutton" ?
This works for me: 'This is on Worksheets(2) Private Sub CommandButton1_Click() Worksheets(1).CommandButton1.Enabled = False End Sub NickHK "rezafloyd" wrote in message ups.com... Dear experts, I embed a command button on sheet1 on a an excel workbook. I'd like to change it's 'enabled' property at run time from a code in sheet2. How can I refer to it's name? (ex. 'worksheets(1).commandbutton.enabled =false' doesn't work) Regards, reza |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
copied formulas refer to destination sheet not source sheet | Excel Worksheet Functions | |||
How can I refer to sheet number not sheet (name)? | Excel Worksheet Functions | |||
Refer new sheet to previous sheet | Excel Worksheet Functions | |||
Refer to sheet name specified in other cell | Excel Discussion (Misc queries) | |||
Excel VBA (?!)-refer to a cell on Sheet to left of X, based on criteria on Sheet X | Excel Programming |