Saturday, May 8, 2010

ReadyState Property

ReadyState Property Example

In my run it showed 0 for msgbox a(READYSTATE_UNINITIALIZED = 0), 1 in case of msgbox b(READYSTATE_LOADING = 1) and 4 in case of msgbox c(READYSTATE_COMPLETE = 4)

strLink= "http://www.yahoo.com"
Set objIExplorer = CreateObject("internetexplorer.application")
objIExplorer.visible = True

a = objIExplorer.readystate
msgbox a
objIExplorer.navigate strLink

b = objIExplorer.readystate
msgbox b

Do While objIExplorer.Busy
WScript.Sleep 1000
Loop

msgbox "Navigation Completed"
c = objIExplorer.readystate
msgbox c



See all Methods & Properties of InternetExplorer Object here.