MS Office Forum

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds

Excel VBA selecting item for web page list box

  Asked By: Lucas    Date: Sep 22    Category: MS Office    Views: 3923

I need to use excel to access a website... and select a value from a
"list box"... html statements

<SELECT id=select1 Name=lstReportName size=8>

and then once selected i can use the send keys to activate the button
on this page... but i can't seem to "select" anything.... the options
don't change so i can have the text to pass as a string.. or what
ever.. but i'm kind of lost about how to do this.



2 Answers Found

Answer #1    Answered By: Jonathan Harrison     Answered On: Sep 22

You may be complicating matters by assuming you need to select  a button.
Buttons simply call another page. Click the button and look at your
address bar to see the URL of this page. Sometimes, a selection made on
the previous form, i.e. your list  box, will appear as a value in the
URL. All you need do is call this URL page  with the value you want from
the list box. Here is an example.

Dim sURL as String

sURL =
&N=0&keywords=" & sISBN

I had to write a program sending ISBN information as we work with this
company. Take note on how I send  a string  variable to the web  page. The
previous page on their sight has a text box  and search button, but that
button leads to the above URL. I simply bypass the search page all

Answer #2    Answered By: Gerald Cruz     Answered On: Sep 22

i'm still exploring that.. from what i cans see the button is a javascript
routine sending the "selected" item  (which is the name of various queries). you
have to select  one and send  it.. i'll check into the button.. as i didn't think
about sending directly to the button..

Didn't find what you were looking for? Find more on Excel VBA selecting item for web page list box Or get search suggestion and latest updates.