Results 1 to 2 of 2

Thread: Internet Explorer Drop Down Box
Thanks Thanks: 0 Likes Likes: 0

  1. #1
    Board Regular
    Join Date
    Jan 2013
    Location
    Texas
    Posts
    78
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Internet Explorer Drop Down Box

    I am trying to select from a dropdown in IE from Access VBA. You cannot right click on the dropdown and inspect element. I ended up using something on found online, and it worked for a while, but it has now stopped working. Here is what I was using...

    Code:
    IEWindow.Document.querySelector("div[id=pagecontents] div[class=container] div[id=resultOptions] form[name=resultOptions] select[id=selectResult]").Focus
    IEWindow.Document.querySelector("div[id=pagecontents] div[class=container] div[id=resultOptions] form[name=resultOptions] select[id=selectResult]").selectedIndex = 4
    IEWindow.Document.querySelector("div[id=pagecontents] div[class=container] div[id=resultOptions] form[name=resultOptions] select[id=selectResult]").dispatchEvent evt


    If I remember correctly, the error that occured is that it could not find the object (presumably the IE control that is referenced).

    I then found another way to find that dropdown, and it appears that it is a control called selectResult (see the HTML below).

    HTML Code:
    - Choose -Store these results in a new C_Merge these results with an ex_Replace an existing ChartList _Download In CSV Format
    So... The problem is that I am having trouble connecting to the IE control (the dropdown box). Then, when I connect to it, I need to be able to select the csv option (which I'm assuming is option 4 if zero based).

  2. #2
    Board Regular
    Join Date
    Jan 2013
    Location
    Texas
    Posts
    78
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Internet Explorer Drop Down Box

    My HTML got lost

    Here it is again (without the HTML tags this time, and without the sideways carrots)...

    select id="selectResult"
    option selected="selected" value="none"- Choose -/option
    option value="new"Store these results in a new C_/option
    option value="merge"Merge these results with an ex_/option
    option value="replace"Replace an existing ChartList _/option
    option value="csv"Download In CSV Format/option
    /select

Some videos you may like

User Tag List

Tags for this Thread

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •