Solved

Sometimes http.Send fails

Posted on 2011-02-12
3
241 Views
Last Modified: 2012-05-11
In the following code:

    http.Open "GET", WebBrowser1.LocationURL, "False"
    http.Send
    Text3 = http.ResponseText

Sometimes "http.Send" fails.  How can I trap this and have http try it again?
0
Comment
Question by:hrolsons
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 30

Accepted Solution

by:
SiddharthRout earned 500 total points
ID: 34883469
Hi

You can use the .Status property to find out it a Get/Post was successful or not via the HTTP Status Codes.

Here is a list of them.

http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html

HTH

Sid
0
 

Author Comment

by:hrolsons
ID: 34883538
I see what you mean, but would it even get to .Status if .Send fails?
0
 
LVL 30

Expert Comment

by:SiddharthRout
ID: 34883540
Yes :)

Sid
0

Featured Post

Enroll in July's Course of the Month

July's Course of the Month is now available! Enroll to learn HTML5 and prepare for certification. It's free for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses
Course of the Month6 days, 22 hours left to enroll

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question