Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > VB How-To
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old January 25th, 2013, 02:00 AM
Registered User
Points: 29, Level: 1
Points: 29, Level: 1 Points: 29, Level: 1 Points: 29, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Dec 2011
Location: Pacific Northwest
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
Reply With Quote
  #2 (permalink)  
Old January 25th, 2013, 07:17 AM
Registered User
Points: 29, Level: 1
Points: 29, Level: 1 Points: 29, Level: 1 Points: 29, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Dec 2011
Location: Pacific Northwest
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
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 04:20 PM.


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