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

Posted on 2009-05-19
Last Modified: 2013-11-25
Hi Guys,

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

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

Open in new window

Question by:raaqi
LVL 14

Accepted Solution

sungenwang earned 500 total points
ID: 24484228

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


Dim IE
Set IE = CreateObject ("InternetExplorer.Application")
IE.Navigate "select.htm"
IE.Visible = True
Do While IE.Busy
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


Author Closing Comment

ID: 31582925

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Server 2012 management. 5 25
Attention Please 10 43
How to make shortcut to ftp site open in windows explorer not IE 3 22
Assigning VBA code to a specific worksheet 3 25
This is about my first experience with programming Arduino.
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…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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 …

809 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