VB Code:
Private Sub Form_Load() WebBrowser1.Navigate "http://www.google.com/" WebBrowser1.Silent = True End Sub Private Sub WebBrowser1_DocumentComplete(ByVal pDisp As Object, URL As Variant) If (pDisp Is WebBrowser1.Application) Then If URL = "http://www.google.com/" Then 'test for google Dim HTML As HTMLDocument Set HTML = WebBrowser1.Document HTML.All.Item("q").Value = "static" HTML.All.Item("btnG").Click End If End If End Sub
I get error
Run-time error '-2 (fffffffe)'
IE7 installed + reference to shdocvw.dll
Really don't know what's going wrong.![]()


Reply With Quote
