williamsF1
asked on
mastering WebBrowser1_DocumentComplete?
Just wondering if I can tweek this code...
It works ok when running it live, but when I 'Step Into' during Debuggin, I get stuck in the loop...
I guess I would like to know why the DocumentComplete Event is not fired [or stepped into] during debuging?
Private Sub WebBrowser1_DocumentComple te(ByVal pDisp As Object, URL As Variant)
pagefinished = 1
End Sub
Private Sub LetsGo()
pagefinished = 0
Call WebBrowser1.Navigate(sItem .href)
Do While pagefinished = 0: DoEvents: Loop
End Sub
p.s. Gin Martinis are better than Vodka?...its friday!!! Cheers
It works ok when running it live, but when I 'Step Into' during Debuggin, I get stuck in the loop...
I guess I would like to know why the DocumentComplete Event is not fired [or stepped into] during debuging?
Private Sub WebBrowser1_DocumentComple
pagefinished = 1
End Sub
Private Sub LetsGo()
pagefinished = 0
Call WebBrowser1.Navigate(sItem
Do While pagefinished = 0: DoEvents: Loop
End Sub
p.s. Gin Martinis are better than Vodka?...its friday!!! Cheers
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
zzzzooc, this doesnt actuall wait for the document to be finished.
I try to set focus on an object and it fails as it hasn't been loaded yet. Sorry.
So I guess there is no other solution. Emoreau, you 100% sure on that?
I try to set focus on an object and it fails as it hasn't been loaded yet. Sorry.
So I guess there is no other solution. Emoreau, you 100% sure on that?
Yes that kind of events can't be traced.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
points to emoreau
Private Sub Command1_Click()
Call WebBrowser1.Navigate("http://www.yahoo.com")
Do Until TypeName(WebBrowser1.Docum
DoEvents
Loop
Call MsgBox("Finished downloading.")
End Sub