Solved

Populating web form

Posted on 2004-04-07
3
161 Views
Last Modified: 2010-05-02
Can I force a select box to a certain selection based on it's index number instead of its value? For instance, my guess is that it would look something like:

ie.Document.All("MYSELECTBOX").Value = ie.Document.All("MYSELECTBOX").Options(1)

(Of course, that line didn't work for me, hence I am posting this question :-)
0
Comment
Question by:AmyL
[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
3 Comments
 
LVL 17

Accepted Solution

by:
zzzzzooc earned 250 total points
ID: 10780710
WebBrowser1.Document.All("MySelectBox").selectedIndex = 2

That?
0
 

Author Comment

by:AmyL
ID: 10780796
Yes, thank you!
0
 
LVL 17

Expert Comment

by:zzzzzooc
ID: 10780830
For future problems such as this, just add a reference ("Project" -> "References...") of "Microsoft HTML Object Library". You can then view the methods/properties of a certain HTML element (HTMLSelectElement for example) and most-likely find your answer. I didn't know the answer.. did what I mentioned above in a minute or so and knew. :)
0

Featured Post

Independent Software Vendors: 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…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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…
Suggested Courses
Course of the Month5 days, 4 hours left to enroll

636 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