Solved

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

Posted on 2009-05-19
2
1,357 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 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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

This is about my first experience with programming Arduino.
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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…
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

758 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

22 Experts available now in Live!

Get 1:1 Help Now