Solved

'Indirect' function in vbscript

Posted on 2009-04-07
2
786 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

Secure Your Active Directory - April 20, 2017

Active Directory plays a critical role in your company’s IT infrastructure and keeping it secure in today’s hacker-infested world is a must.
Microsoft published 300+ pages of guidance, but who has the time, money, and resources to implement? Register now to find an easier way.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Deploying a Microsoft Access application in a Citrix environment is not difficult but takes a few steps. However, Citrix system people are often of little help, as they typically know next to nothing about Access. The script provided here will take …
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 …

733 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