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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

A short article about a problem I had getting the GPS LocationListener working.
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

932 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

12 Experts available now in Live!

Get 1:1 Help Now