Hi, I'm writing VBA code that extracts text from news items and inserts it into an Excel ssheet.
Often I find that the macro does not find the relevant news because the page is still loading and the VBA code that is supposed to prevent the macro moving on until the load is complete is having trouble working properly. Is there any better way of ensuring the internet explorer page is fully loaded than to put a massive for next loop in?
The code that is not working well is shown below.
'###################################################
Do While ie.readyState <> READYSTATE_COMPLETE
Loop
Do While Left(ie.StatusText, 4) = "Open"
Loop
For x = 1 To 1000000000
Next x
'###################################################
Thanks in advance.
Famous.
Often I find that the macro does not find the relevant news because the page is still loading and the VBA code that is supposed to prevent the macro moving on until the load is complete is having trouble working properly. Is there any better way of ensuring the internet explorer page is fully loaded than to put a massive for next loop in?
The code that is not working well is shown below.
'###################################################
Do While ie.readyState <> READYSTATE_COMPLETE
Loop
Do While Left(ie.StatusText, 4) = "Open"
Loop
For x = 1 To 1000000000
Next x
'###################################################
Thanks in advance.
Famous.