I see this type of question get asked a lot and I'm at a loss to understand
why. I've been programming since 1981 and have yet to run into a need to do
this type of indirection. After all, it could only be used successfully by
the programmer him/herself... I mean, you can't expect the user to know to
type in "ll_temp" into a TextBox in order for the program to go and get the
value of PI hiding underneath it. So, if it would only be used by the
programmer internally to his/her program, why not just use the variable
ll_temp directly? Or, if there is some kind of variability required (having
trouble imagining what), simply use a Select Case statement. And if needed
more than a couple of times, set up a function that runs the Select Case
instead so that you can pass in an argument indicating you want the value of
PI. Maybe make the function take a String argument so "ll_temp" could be
passed in even.<g>
Rick - MVP
"Bob Butler" <ti*******@nospam.com> wrote in message
news:h1Ibb.1819$gi2.485@fed1read01...
"Jacco" <js*****@gmx.net> wrote in message
news:64**************************@posting.google.c om Hi,
can anyone help me with the following:
Suppose I have a variable ll_temp containing pi and a variable test
containing "ll_temp". Then with what syntax do I get the value of pi
out of test ??
ll_temp = 3.1415926
test= "ll_temp"
VB doesn't have a direct way to do that. One option:
dim c as collection
set c=new collection
c.add il_temp,"il_temp"
msgbox c.item(test)