View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips Bob Phillips is offline
external usenet poster
 
Posts: 1,726
Default 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!