diddi

Well-known Member
Joined
May 20, 2004
Messages
3,337
Office Version
  1. 2010
Platform
  1. Windows
hi all. i have an ie automation issue. the code (bottom) works fine. my problem is that there are multiple pages. it is possible to display all pages however by automating this portion of html:
Code:
<a href="#" *******="document.linkForm11.submit();return false;">Next<b>-〉</b></a> &nbsp <form method=POST name=linkForm12 action="/search.php?page=all" style="display:inline; margin:0; padding:0;">
<input type="hidden" name="search_sn" value="">
<input type="hidden" name="search_sx" value="0">
<input type="hidden" name="search_gn" value="A">
<input type="hidden" name="search_lo" value="">
<input type="hidden" name="search_y1" value="1800">
<input type="hidden" name="search_y2" value="1850">
<input type="hidden" name="search_pu" value="">
<input type="hidden" name="search_st" value="">
<input type="hidden" name="search" value=1></form>
<a href="#" *******="document.linkForm12.submit();return false;">[Show All]</a> </div>

i just cant seem to be able to find a way to implement it.

Code:
    MyURL = "http://ryersonindex.org/search.php"
    Set IE = CreateObject("InternetExplorer.Application")

    IE.navigate MyURL
 
    Do Until IE.Readystate = 4: DoEvents: Loop
 
    IE.Visible = True
    Set doc = IE.document
    Set ElementCol = IE.document.getElementsByTagName("INPUT")

    For Each btnInput In ElementCol
        If btnInput.Type = "text" Then
            If btnInput.Name = "search_gn" Then btnInput.Value = "A"
            If btnInput.Name = "search_y1" Then btnInput.Value = "1800"
            If btnInput.Name = "search_y2" Then btnInput.Value = "1850"
        End If
    Next btnInput

    For Each btnInput In ElementCol
        If btnInput.Name = "search" Then btnInput.Click
    Next btnInput
    
    Do Until IE.Readystate = 4: DoEvents: Loop
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.

Forum statistics

Threads
1,215,584
Messages
6,125,670
Members
449,248
Latest member
wayneho98

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top