Solved

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

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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
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…
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…
Introduction to Processes

717 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