Re: Internet Explorer object...

Tech-Archive recommends: Speed Up your PC by fixing your registry

From: Larry Serflaten (serflaten_at_usinternet.com)
Date: 11/25/04


Date: Thu, 25 Nov 2004 13:38:50 -0600


"JS" <not@home.net> wrote
> On my first try (all on same thread) when I did (pseudocode follows):
>
> wb.Navigate
> Do while DocCompleteCount < X
> Loop
>
> The Navigate got executed but never returned, the loop locked up the
> application never finishing the Navigate.

Did you try counting the DocumentComplete events from within the
DocumentComplete event? When you get to X number of events,
abort (Stop) the page and call a sub that has the code you need
executed.

Also I saw no mention of using DoEvents to let the WB process
its own events on your thread, but counting in the DocumentComplete
event itself would force you to remove the loop and let that sub end,
so DoEvents should not be needed (here).

LFS



Relevant Pages

  • vba: Loop to load webpage
    ... I'm stuck and wish it was in a loop! ... I'm loading a webpage, entering login ... info that takes me to a homepage and then trying to navigate from there to ... not giving the homepage time to load. ...
    (microsoft.public.excel.programming)
  • navigating to an unnamed spawned window ?
    ... I have the following VBA code to launch an IE application, navigate to a URL, ... Loop ...
    (microsoft.public.excel.programming)
  • about:blank and ie.readyState
    ... Normally if you have an instance of IE and you navigate somewhere, ... to give IE a chance to load the DOM so that you can access things like ... grasshopper ...") where that loop is necessary when IE navigates to the ... The OP in the following thread claims that it did make a ...
    (microsoft.public.scripting.vbscript)
  • Re: Webbrowser
    ... Dim ie as new webbrowser ... Same as if I declare the ebject with withevents, navigate, and then expect callback - it never comes. ...
    (microsoft.public.dotnet.languages.vb)
  • Copy data from IE to Excel
    ... The code given below opens Internet Explorer, ... .navigate "http://www.MyIntranetASPPage.com"; ... Do While .busy: DoEvents: Loop ...
    (microsoft.public.excel.programming)