View Single Post
  #9   Report Post  
Posted to microsoft.public.excel.programming
Nigel Nigel is offline
external usenet poster
 
Posts: 923
Default Detecting Change in State of Internet Explorer

Not sure if this helps but I use this to wait for a response, I have in the
past also used the OnTime function to time this out if needed.

Sub WebLink()
Set ie = CreateObject("InternetExplorer.Application")

sURL = "http://www.yourpage.com"

ie.Navigate sURL

'wait for response
Do Until Not ie.Busy And ie.ReadyState = 4
DoEvents
Loop

ie.Visible = True

ie.Quit
Set ie = Nothing

End Sub


--
Cheers
Nigel



"Ash" wrote in message
...
I'm writing a macro to copy data to and from a web page using mainly the
send
keys function. Currently I have set a long wait period in the code while
the
site updates. This not only makes the macro run slower than it needs to
but
also cannot detect if the site crashes.

Does anyone know a way i can check the state of the site and detect a
change. Eg when the site move from account search to account information.