[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1762
  • Last Modified:

VbScript and InternetExplorer.Application

I'm using VBScript to generate some HTML and and having some trouble extracting the values of certain form fields using

web = CreateObject("InternetExplorer.Application")
value = web.document.all.<variableName>.value

All of my form values are things like:
var1
var2
var3
var4
..

So instead of having to specifiy each variable assignment using:
value1 = web.document.all.var1.value
value2 = web.document.all.var2.value
value3 = web.document.all.var3.value
value4 = web.document.all.var4.value

I wanted to use an array:
varName = Array ("var1","var2","var3","var4")
value(4)
for i=0 to ubound(varName)
 value(i) = web.document.all.varName(i).value
Next

Is this even possible?
0
nub99
Asked:
nub99
1 Solution
 
EDDYKTCommented:
has you tried

value(i) = web.document.all(varName(i)).value
0
 
nub99Author Commented:
Thanks that worked great!
0

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now