I use a NavigateAndWait in my webbased applications..
Private Sub NavigateAndWait(ByVal URL As String)
'Navigate to a URL, and wait for it to fully display.
Dim StartTime As Long
StartTime = timeGetTime
StatusBar1.Panels(3).Text = ""
ProgressBar1.Visible = True
MousePointer = vbHourglass
CurrentURL = ""
WebBrowser1.Navigate URL
Do Until CurrentURL > ""
DoEvents
Loop
MousePointer = vbDefault
ProgressBar1.Visible = False
StatusBar1.Panels(3).Text = "Elapsed: " & Format((timeGetTime - StartTime) / 1000, "#.00") & " seconds"
End Sub
Which basically loads the page and waits untill it is loaded.
If your doing anything on the pages you can check if the page contains certain code..
Private Function WebPageContains(ByVal s As String) As Boolean
'Returns whether or not the web page contains a certain phrase.
Dim I As Long, HTMLElement
For I = 1 To WebBrowser1.Document.All.length
Set HTMLElement = WebBrowser1.Document.All.Item(I)
If Not (HTMLElement Is Nothing) Then
If InStr(1, HTMLElement.innerHTML, s, vbTextCompare) > 0 Then
WebPageContains = True
Exit Function
End If
End If
Next I
End Function
My application was simply a bot for Dark-Future and Pimp Area, which combined my own OCR and script for crimes and stuff.