Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

'Indirect' function in vbscript

Posted on 2009-04-07
2
Medium Priority
?
820 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 2000 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
The SignAloud Glove is capable of translating American Sign Language signs into text and audio.
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

597 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