HTML Object (createDocumentFromUrl) - Wont click
im stuck. I cant seem to click the button of a page using strictly the HTML object. I can click links.. but for some reason cant click a button?? any ideas?
VB Code:
Dim WithEvents HTML As HTMLDocument
Dim COMPLETE As Boolean
Dim tHTML As HTMLDocument
Private Sub Form_Load()
Set tHTML = New HTMLDocument
Set HTML = tHTML.createDocumentFromUrl("http://www.google.com/", vbNullString)
Debug.Print HTML.url
Do Until COMPLETE
DoEvents
Loop
HTML.documentElement.All.q.Value = "apples"
HTML.All.btnG.Click
Do Until COMPLETE
DoEvents
Loop
End Sub
Private Sub HTML_onreadystatechange()
If HTML.readyState = "complete" Then COMPLETE = True Else COMPLETE = False
Debug.Print "HTML: " & HTML.readyState & " " & HTML.url & " " & COMPLETE
End Sub
Re: HTML Object (createDocumentFromUrl) - Wont click
Re: HTML Object (createDocumentFromUrl) - Wont click
Do you mean the ff. code does not do anything?
Code:
HTML.All.btnG.Click
If yes then sorry but I had a similar problem with it a year ago and found no solution with such scenario... :(
Re: HTML Object (createDocumentFromUrl) - Wont click
Just wondering, how are you checking that you can't click buttons?