?
Solved

VBS Internet Explorer Object- Select Multiple Value's in list box?

Posted on 2009-05-19
2
Medium Priority
?
1,796 Views
Last Modified: 2013-11-25
Hi Guys,

Code is below. Any idea how to select multiple value's in a multi-line select box?

Regards,
Raaqi
Dim IE
Set IE = CreateObject ("InternetExplorer.Application")
 
IE.Navigate "select.htm"
IE.Visible = True
 
 
do while IE.Busy
Loop
 
IE.Document.all("toppings").value = "onions"

Open in new window

0
Comment
Question by:raaqi
2 Comments
 
LVL 14

Accepted Solution

by:
sungenwang earned 2000 total points
ID: 24484228
Hi,

The code below will select multiple items (1,3,4) in the checkbox below.
MultiListBox should be the name of the list box item.

sew

Dim IE
Set IE = CreateObject ("InternetExplorer.Application")
 
IE.Navigate "select.htm"
IE.Visible = True
 
Do While IE.Busy
Loop
 
Set objListbox = IE.document.getElementById("MultiListBox")
objListbox.Options(0).Selected = True
objListbox.Options(2).Selected = True
objListbox.Options(3).Selected = True

Open in new window

0
 

Author Closing Comment

by:raaqi
ID: 31582925
thanks
0

Featured Post

Industry Leaders: 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

In real business world data are crucial and sometimes data are shared among different information systems. Hence, an agreeable file transfer protocol need to be established.
When you discover the power of the R programming language, you are going to wonder how you ever lived without it! Learn why the language merits a place in your programming arsenal.
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
Starting up a Project

850 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