hello I am trying to this code I got from Bloodeye a while ago. It used to work but I am trying to submit through a post method ona PHP page.
I keep getting the error:
"Object variable or with block variable not set"
Any ideas what's up?
Code:Private Sub Command1_Click() WebBrowser1.Navigate "http://www.alltheweb.com/add_url.php" End Sub Private Sub WebBrowser1_DocumentComplete(ByVal pDisp As Object, URL As Variant) Dim submitalltheweb As String, submittedalltheweb As String Static x As Integer submitalltheweb = "http://www.alltheweb.com/add_url.php" submittedalltheweb = Mid(WebBrowser1.LocationURL, 1, 29) If (pDisp = WebBrowser1.Object) Then If submittedalltheweb = "http://www.alltheweb.com/add_url.php" Then WebBrowser1.Navigate submitalltheweb ElseIf WebBrowser1.LocationURL = submitalltheweb Then With WebBrowser1.Document.Forms(1) 'If x > 9 Then Exit Sub .All("url").Value = "www.test.com" .All("submit").Click 'x = x + 1 End With End If End If End Sub




Reply With Quote