Solved

'Indirect' function in vbscript

Posted on 2009-04-07
2
739 Views
Last Modified: 2012-05-06
Hi guys, I need something similar to excel's 'indirect' function, but in vbscript.

The idea is like this:
helloworld = 3
part1 = "hello"
part2 = "world"
myvariable = part1 & part2

In the above, myvariable would have the value of "helloworld" but what I want is for it to be the *value* of helloworld ie 3.

Kind of like INDIRECT (Part1 & Part2).

Any thoughts?
0
Comment
Question by:Nathan08
2 Comments
 
LVL 29

Accepted Solution

by:
David H.H.Lee earned 500 total points
ID: 24094638
Hi Nathan08,
Try eval() function.
<%
Response.write(eval(myvariable))
%>

More details:
http://www.aspdev.org/articles/asp-eval-execute/
0
 

Author Comment

by:Nathan08
ID: 24095596
Hmm, I knew about eval but didn't think it would work in vbscript.  Anyway, it does!  Thanks
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

A short article about problems I had with the new location API and permissions in Marshmallow
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now