WebBrowser1.Document length(?) & pDisp

I am trying to click thru some single frame webpages which only have text and a 'Click' button. The number of pages varies.

Can someone explain what the pDisp is used for and why do I always get 4 pages as the number of pages even tho there are more.

Private Sub WebBrowser1_DocumentComplete(ByVal pDisp As Object, URL As Variant)
If URL <> "about:blank" Then
If ShowNWPages = False Then
NWpages = WebBrowser1.Document.Forms(0).length + 1
msgbox = "There are" + Str(NWpages) + " pages to do. " _
ShowNWPages = True
End If
For z = 0 To WebBrowser1.Document.Forms(0).length - 1
If WebBrowser1.Document.Forms(0)(z).Type = "submit" Then
WebBrowser1.Document.Forms(0)(z).Click
else
WebBrowser1.Navigate "about:blank"
End If
Next z
End If
End Sub

I would appreciate your help.
[982 byte] By [nbCathy] at [2007-11-19 19:54:10]