Oliver Dewar
Board Regular
- Joined
- Apr 17, 2011
- Messages
- 201
Hi All.
I'm using the following code to navigate Internet Explorer around:
Sometimes I hit a site which takes a long time to load, or has an on page coding error which causes it to never load.
I'd therefore like to set a timeout duration, so allow the browser say, 30 seconds, to load before aborting the load.
I guess the command would be put in the 'Do Until .readyState = 4' line as an OR statement... but how would I implement this? Any ideas or known solutions?
Cheers,
Oliver
I'm using the following code to navigate Internet Explorer around:
Code:
With IE
.Visible = False
.Navigate "http://www.domain.com/" 'this is could be any domain
Do Until .readyState = 4: DoEvents: Loop
End With
Sometimes I hit a site which takes a long time to load, or has an on page coding error which causes it to never load.
I'd therefore like to set a timeout duration, so allow the browser say, 30 seconds, to load before aborting the load.
I guess the command would be put in the 'Do Until .readyState = 4' line as an OR statement... but how would I implement this? Any ideas or known solutions?
Cheers,
Oliver