Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error message of Microsoft.XMLHTTP

Status
Not open for further replies.

Unknovvn

Technical User
Apr 28, 2012
1
NZ
Hi there,

I am trying to run a simple code:

Set HTMLRs = CreateObject("Microsoft.XMLHTTP")
HTMLRs.Open "GET", URL, False
HTMLRs.Send
TakenHTML = HTMLRs.responseBody

However I get an error of:
-------
msxml3.dll error '800c0005'
The system cannot locate the resource specified.
-------
Error Line pointed to HTMLRs.Send

I used it as a test on whether the url is valid. So I put an error url on purpose. But is it possible for us to output an error message if there are no server response on the target url?

Any help is appreciated. thanks,
- Warrick

 
Check the HTTP headers

obj.getAllResponseHeaders to get all the headers

or

obj.Status to get the HTTP response code

obj.StatusText to get the text associated with the HTTP response code


Chris.

Indifference will be the downfall of mankind, but who cares?
Time flies like an arrow, however, fruit flies like a banana.
Webmaster Forum
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top