Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Sometimes http.Send fails

Posted on 2011-02-12
3
Medium Priority
?
242 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 2000 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

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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

730 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