Hi all
I have the following macro that opens a site then click on a button to customize search. When it is executed, a new window is opened to tick some boxes. I want to tick all boxes but I don’t know how to do it programmatically. I search similar cases but I couldn't find an answer. Any ideas?
Sub OpenSite()
Set IE = New InternetExplorer
Set objHTML = New HTMLDocument
apiShowWindow IE.hwnd, SW_MAXIMIZE
URL = "http://www.ebay.co.uk/sch/i.html?_nkw=art&_in_kw=1&_ex_kw=&_sacat=0&_udlo=&_udhi=&_ftrt=901&_ftrv=1&_sabdlo=&_sabdhi=&_samilow=&_samihi=&_sargn=-1%26saslc%3D1&_salic=3&_sop=12&_dmd=1&_ipg=50"
With IE
.navigate URL
.Visible = True
While .Busy Or .readyState <> READYSTATE_COMPLETE
DoEvents
Wend
Set objHTML = .document
DoEvents
End With
Set ButtonIE = IE.document.getElementById("custLink")
ButtonIE.Click
End Sub
I have the following macro that opens a site then click on a button to customize search. When it is executed, a new window is opened to tick some boxes. I want to tick all boxes but I don’t know how to do it programmatically. I search similar cases but I couldn't find an answer. Any ideas?
Sub OpenSite()
Set IE = New InternetExplorer
Set objHTML = New HTMLDocument
apiShowWindow IE.hwnd, SW_MAXIMIZE
URL = "http://www.ebay.co.uk/sch/i.html?_nkw=art&_in_kw=1&_ex_kw=&_sacat=0&_udlo=&_udhi=&_ftrt=901&_ftrv=1&_sabdlo=&_sabdhi=&_samilow=&_samihi=&_sargn=-1%26saslc%3D1&_salic=3&_sop=12&_dmd=1&_ipg=50"
With IE
.navigate URL
.Visible = True
While .Busy Or .readyState <> READYSTATE_COMPLETE
DoEvents
Wend
Set objHTML = .document
DoEvents
End With
Set ButtonIE = IE.document.getElementById("custLink")
ButtonIE.Click
End Sub