Sorry for that clunky title.
I need to do this:
Dim strName as String
strName = "Bill"
a = "str"
b = "Name"
x = Eval(a&b) 'this is where I need help
and now x should hold the value "Bill"
I know this can be done because I've done it before.
How do I compose the name of a variable programmatically and retrieve its value?
I know i can pass strName to x directly, but I need to be able to do it dynamically.
I don't think Eval() is what I'm looking for, but I know there is a way to do it. Just can't remember.
Thanks.
I need to do this:
Dim strName as String
strName = "Bill"
a = "str"
b = "Name"
x = Eval(a&b) 'this is where I need help
and now x should hold the value "Bill"
I know this can be done because I've done it before.
How do I compose the name of a variable programmatically and retrieve its value?
I know i can pass strName to x directly, but I need to be able to do it dynamically.
I don't think Eval() is what I'm looking for, but I know there is a way to do it. Just can't remember.
Thanks.