A
Andrew
Hello,
I have a VBA program which contains about 100 variables. I would like
to be able to see the value of any of those variables from the
worksheet. On the worksheet I have created a drop down list with all
of my possible variable names, and my VBA code looks at the value of
this list to determine which variable it should spit out to the
worksheet. The problem is that when the VBA code reads the list
value, the value comes in as a string, and even through the string
matches the variable name, the VBA output to the worksheet is not the
variable value, but the literal string value.
For example
Dim X as double
Dim Y as double
Dim select as string
select =cells(1,1) ' Cells(1,1) contains "X"
For K=1 TO 10
Y=2*X
cells(1,2)=select ' Ideally, this would spit out the value of X.
But it returns "X" as a string
Next
So, how do I declare "select" so that it enters the VBA code as a call
to the variable?
thanks
I have a VBA program which contains about 100 variables. I would like
to be able to see the value of any of those variables from the
worksheet. On the worksheet I have created a drop down list with all
of my possible variable names, and my VBA code looks at the value of
this list to determine which variable it should spit out to the
worksheet. The problem is that when the VBA code reads the list
value, the value comes in as a string, and even through the string
matches the variable name, the VBA output to the worksheet is not the
variable value, but the literal string value.
For example
Dim X as double
Dim Y as double
Dim select as string
select =cells(1,1) ' Cells(1,1) contains "X"
For K=1 TO 10
Y=2*X
cells(1,2)=select ' Ideally, this would spit out the value of X.
But it returns "X" as a string
Next
So, how do I declare "select" so that it enters the VBA code as a call
to the variable?
thanks