?
Solved

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

Posted on 2009-05-19
2
Medium Priority
?
1,656 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 2000 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

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

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

In this post we will learn different types of Android Layout and some basics of an Android App.
Make the most of your online learning experience.
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

771 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