Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Use a string as a form control name?
How can I change this routine to make it more generic? I want to enable a
form textbox (Sxxxx) depending on the value of a form checkbox (Qxxxx). Basically I need to know how to use a string as a control name. I tried creating a generic object using set foo = OLEobject('Q'&'2222').object but it failed with 'Sub or Function not Defined' ----------------------------------------------- Sub EnableDisable() Dim iUniqueNumberAs String 'capture the unique number....NOW WHAT DO I DO WITH IT?? iUniqueNumber= TEXT(Right(Q1062.Name, 4)) If Q1062.Value = True Then S1062.Enabled = False Else S1062.Enabled = True End If End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
2007 Form Control/ActiveX Control font difference | Excel Discussion (Misc queries) | |||
How to show User Form when form name is in string? | Excel Programming | |||
Tool Tip Text for Form control/ Active-X control | Excel Programming | |||
passing control value from one form to another form | Excel Programming | |||
Separate String into string + value form | Excel Programming |