Quote:
Originally Posted by Cableguy
call the navigate method, and wait for it to raise the navigated event in order
|
If you need to do this then your program structure is probably not optimal. The problem is that the event sub needs to run on the main thread and your call to the navigate method is also on this thread so you need to exit your sub so that the message loop can run to process the event code.
Quote:
|
I know that i can do it with cascating subs....
|
For the reason given above I don't think you can!
You
can do it with a loop around DoEvents but it is a bit inelegant and burns processor cycles, but on a desktop it probably doesn't matter.
Code:
Flag = false
Web.Navigate(somewhere)
Do While Flag = false
DoEvents
Loop
...
Sub Web_Navigated
DoStuff
Flag = true
End Sub