This is error free code with added reference to Microsoft Internet Control.

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 Run-Time Error -1 (fffffffe) and -2 (fffffffe) on document complete.

please help.