Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > VB How-To
|
VB How-To Ask your "How do I do this with VB?" questions in this forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 25th, 2013, 02:00 AM
Registered User
 
Join Date: Dec 2011
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to hmclark Send a message via Yahoo to hmclark
Default halt program execution while web page loads

Hi everyone I am haveing a problem with a visual basic 6 program.
the program sends a search string to a web page then takes the result and updates an excel spreadsheet. problem is some of the websites are very SLOW loading and by the time the page loads, my vb program has moved on.
I have tried the following 2 option but niether is halting execution long enough

Code:
With ie     
        While ie.Busy
            DoEvents
        Wend


        While Not .ReadyState = 4
            Sleep 2000      'wait 2 sec before trying again
        Wend
End With
I have tried increasing the sleep time, with same result.
Any help would be greatly appreciated
 
Old January 25th, 2013, 07:17 AM
Registered User
 
Join Date: Dec 2011
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to hmclark Send a message via Yahoo to hmclark
Default issue solved

hi , after searcing through other posts here, I found this solution

Code:
        With ie
            Do Until (.ReadyState = 4 And Not .Busy): DoEvents: Loop
        End With

works very well in my case.

regards





Similar Threads
Thread Thread Starter Forum Replies Last Post
problem during execution of php program greenday Beginning PHP 2 November 12th, 2007 04:51 PM
Random News Topic when the page loads morpheus Classic ASP Databases 4 November 21st, 2003 01:38 PM
Generate a random article when page loads morpheus SQL Server ASP 1 October 28th, 2003 10:45 AM
How to terminate program execution without "End" pavel Beginning VB 6 2 September 2nd, 2003 06:20 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.