VbScript and InternetExplorer.Application

Posted on 2006-06-14
Last Modified: 2012-06-22
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:

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")
for i=0 to ubound(varName)
 value(i) = web.document.all.varName(i).value

Is this even possible?
Question by:nub99
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
LVL 26

Accepted Solution

EDDYKT earned 145 total points
ID: 16904518
has you tried

value(i) = web.document.all(varName(i)).value

Author Comment

ID: 16905572
Thanks that worked great!

Featured Post

Technology Partners: 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

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

696 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