Populating web form

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 :-)
Who is Participating?
zzzzzoocConnect With a Mentor Commented:
WebBrowser1.Document.All("MySelectBox").selectedIndex = 2

AmyLAuthor Commented:
Yes, thank you!
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. :)
All Courses

From novice to tech pro — start learning today.