07-01-2011, 07:58 PM
Hi.
It depends on how you're invoking the URL.
If you're using the "InternetExplorer.Application" approach, then your task becomes very easy. Follow the code below:
Set objIE = WScript. CreateObject("InternetExplorer.Application", "objIE_")
By using this, you've attached a name to the IE object.
Now, you invoke the URL. Also define a Sub like so:
Let me know if this helped.
It depends on how you're invoking the URL.
If you're using the "InternetExplorer.Application" approach, then your task becomes very easy. Follow the code below:
Set objIE = WScript. CreateObject("InternetExplorer.Application", "objIE_")
By using this, you've attached a name to the IE object.
Now, you invoke the URL. Also define a Sub like so:
Code:
Sub objIE_NavigateError(pDisp, URL, TargetFrameName, StatusCode, Cancel)
' in case there's been an error, for example, 404 Not Found, then the control would 'reach this place.
MsgBox. "Error: " & StatusCode
End Sub
Let me know if this helped.