Hi Everyone,
I Made a VBA Macro for Excel, the VBA script checks several websites for links, source code etc. I get the links out of the source code by doc.Links
Before the source-code is being downloaded I'm checking if the site is completely loaded. I perform this check by the following code:
With hundreds of websites this is working correct, but several websites doesn't give a 'Complete'-status back. So i started to search for a solution which could fix this and added the following code:
So after 30 seconds the script would continue, but strangly enough several websites like these:
- -
Keep giving problems, as soon as the script reaches
Excel crashes completely and needs to be restarted, do you have any idea how i could fix this?
Thanks a lot!
Regards Yannick
I Made a VBA Macro for Excel, the VBA script checks several websites for links, source code etc. I get the links out of the source code by doc.Links
Before the source-code is being downloaded I'm checking if the site is completely loaded. I perform this check by the following code:
Code:
While ((doc.readyState <> "complete"))
DoEvents
Wend
With hundreds of websites this is working correct, but several websites doesn't give a 'Complete'-status back. So i started to search for a solution which could fix this and added the following code:
Code:
Start = Timer
While ((doc.readyState <> "complete"))
If ((Timer - Start) > 30) Then
' Voer actie uit
Else
DoEvents
End if
Wend
So after 30 seconds the script would continue, but strangly enough several websites like these:
- -
Keep giving problems, as soon as the script reaches
Code:
While ((doc.readyState <> "complete"))
Excel crashes completely and needs to be restarted, do you have any idea how i could fix this?
Thanks a lot!
Regards Yannick