Solved

Populating web form

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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
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…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

705 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

19 Experts available now in Live!

Get 1:1 Help Now