Solved

'Indirect' function in vbscript

Posted on 2009-04-07
2
799 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Displaying an arrayList in a listView using the default adapter is rarely the best solution. To get full control of your display data, and to be able to refresh it after editing, requires the use of a custom adapter.
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
Progress
Starting up a Project

705 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