Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Convert String variable to code

The short answer is no, you can't. The closest you can get is to use VBA to
write a new VBA Sub and then call that sub. If you structure things right,
and put the code in a class, you can use CallByName to execute a method of
the class.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
(email address is on the web site)

"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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Convert String variable to code Bob Phillips Excel Programming 1 December 11th 06 11:39 PM
Convert string to variable Jason Morin Excel Programming 2 September 27th 06 07:13 PM
incorporate string variable into VB code itsthebike[_3_] Excel Programming 1 September 22nd 05 06:16 PM
How do I convert an integer variable to a string variable? dumbass Excel Programming 2 May 21st 04 07:34 PM
VBA - Convert my variable range array to single cell string Kevin G[_2_] Excel Programming 6 January 28th 04 07:20 AM


All times are GMT +1. The time now is 12:19 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"