Solved

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

Posted on 2009-05-19
2
1,549 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
[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 Comments
 
LVL 14

Accepted Solution

by:
sungenwang earned 500 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

Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

Question has a verified solution.

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

Displaying an arrayList in a listView using the default adapter is rarely the best solution. To get full control of your display data, and to be able to refresh it after editing, requires the use of a custom adapter.
Computer science students often experience many of the same frustrations when going through their engineering courses. This article presents seven tips I found useful when completing a bachelors and masters degree in computing which I believe may he…
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

739 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