VBA help needed

Discuss anything related to using the program (eg. triggered betting tactics)

Moderator: 2020vision

VBA help needed

Postby Shaun » Fri Sep 18, 2015 3:29 am

Wondering if i get get some help solving an issue, i use this code to get data from a website, however the site in questions always blocks the first attempt, after that it works fine, unless i leave it more than about 10 minutes then it blocks the first attempt again with an error "access denied" i need some sort of error code checking added to my code so they it will send the request again until it is accepted.

Code: Select all
Public Function ExecuteWebRequest(url As String) As String
    Dim oXHTTP As Object
    Set oXHTTP = CreateObject("MSXML2.XMLHTTP")
    oXHTTP.Open "GET", url, False
    oXHTTP.send
    ExecuteWebRequest = oXHTTP.responseText
    Set oXHTTP = Nothing
End Function
Shaun
 
Posts: 435
Joined: Fri May 09, 2008 11:11 pm
Location: Kellerberrin, Western Australia

Re: VBA help needed

Postby Shaun » Fri Sep 18, 2015 8:30 am

I may have a solution to this with a small change to my code.

Set oXHTTP = CreateObject("MSXML2.ServerXMLHTTP")
Shaun
 
Posts: 435
Joined: Fri May 09, 2008 11:11 pm
Location: Kellerberrin, Western Australia

Re: VBA help needed

Postby Dewsamal » Wed Oct 14, 2015 9:45 am

You really helped me in every aspect.
Dewsamal
 
Posts: 2
Joined: Wed Oct 14, 2015 9:29 am


Return to Discussion

Who is online

Users browsing this forum: No registered users and 20 guests

Sports betting software from Gruss Software


The strength of Gruss Software is that it’s been designed by one of you, a frustrated sports punter, and then developed by listening to dozens of like-minded enthusiasts.

Gruss is owned and run by brothers Gary and Mark Russell. Gary discovered Betfair in 2004 and soon realised that using bespoke software to place bets was much more efficient than merely placing them through the website.

Gary built his own software and then enhanced its features after trialling it through other Betfair users and reacting to their improvement ideas, something that still happens today.

He started making a small monthly charge so he could work on it full-time and then recruited Mark to help develop the products and Gruss Software was born.

We think it’s the best of its kind and so do a lot of our customers. But you can never stand still in this game and we’ll continue to improve the software if any more great ideas emerge.