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




Reply With Quote