Solved

Populating web form

Posted on 2004-04-07
3
157 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
  • 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
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.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

919 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now