|
-
Apr 17th, 2008, 08:13 PM
#1
Accessing a variable name by a variable
I know you can call a function by name or by it's name in a variable. My question is can that also be done for named variables or Const's?
To illustrate
I have the following data strings in my code:
Private Const s1 = "some text here"
Private Const s2 = "some text here"
Private Const s3 = "some text here"
Private Const s4 = "some text here"
etc
etc
Private Const s356 = "some text here"
I cannot put the data in an array. That is out of the question. I can only put the data in a series of Const's like shown above.
I need some way, if possible, to access the data from each Const without having to explicitly namming each Const. Something like this
For q = 1 to 356
MyDataString = MyDataString & "s" & q
Next q
Now I know the above will put "s1", "s2", "s3",...."s356" in MyDataString but I need the actual data from these Const's.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|