How do I reference a variable indirectly? Is there a way to do something like this:
var=Inputbox("Enter the variable to display")
'imagine that "x" was entered"
print ? '{the value of the variable named x)
Printable View
How do I reference a variable indirectly? Is there a way to do something like this:
var=Inputbox("Enter the variable to display")
'imagine that "x" was entered"
print ? '{the value of the variable named x)
The only way I can think of to do it is:------------------Code:Select Case var
Case "x"
Print x
Case "y"
Print y
Case "z"
Print z
Case Else
MsgBox "Variable " & var & " not defined"
End Select
Marty
[This message has been edited by MartinLiss (edited 12-08-1999).]