Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Convert String variable to code
Surely
sProperty = textbox1.tag msgbox("Custom Object Property = " & sProperty) gets what you want? -- --- HTH Bob (change the xxxx to gmail if mailing direct) "Hokievandal" wrote in message ... Hello all, Is there a way to pass a string variable such as "textBox1.visible=true" to be read as code? I'm wanting to store short object properties within control tags to reduce code so that the program can loop through several text boxes and return values using the text in the control tag. Simplified example; dim Task as CustomObject sProperty = textbox1.tag msgbox("Custom Object Property = " & task.sProperty) Thanks! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Convert String variable to code
Is the user input the control name? If so,
MsgBox Me.Controls(sStringCommand).Left -- --- HTH Bob (change the xxxx to gmail if mailing direct) "Hokievandal" wrote in message ... I didn't state my question very well. Instead, how could i make the following work? Dim sStringCommand as String sStringCommand = "msgbox("Enter Name:") call sStringCommand and have the code 'MsgBox... ' run Thanks again, Ryan "Bob Phillips" wrote: Surely sProperty = textbox1.tag msgbox("Custom Object Property = " & sProperty) gets what you want? -- --- HTH Bob (change the xxxx to gmail if mailing direct) "Hokievandal" wrote in message ... Hello all, Is there a way to pass a string variable such as "textBox1.visible=true" to be read as code? I'm wanting to store short object properties within control tags to reduce code so that the program can loop through several text boxes and return values using the text in the control tag. Simplified example; dim Task as CustomObject sProperty = textbox1.tag msgbox("Custom Object Property = " & task.sProperty) Thanks! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
convert text string to a number code | Excel Discussion (Misc queries) | |||
Convert string to variable | Excel Programming | |||
incorporate string variable into VB code | Excel Programming | |||
How do I convert an integer variable to a string variable? | Excel Programming | |||
VBA - Convert my variable range array to single cell string | Excel Programming |