Open soccer markets with Vba

Please post any questions regarding the program here.

Moderator: 2020vision

Postby Tradyann » Mon Feb 20, 2012 11:40 am

I'm a beginner with VBA, and I don't find a solution to search words in a range and apply to this code :

If InStr(1, tBAEvents.key, "Over/Under", vbTextCompare) > 0 AND InStr(1, tBAEvents.key, "words searched in a range", vbTextCompare) > 0 Then


e.g. "words searched in a range" should be Argentinian, Croatian... in range Z1:Z30 of sheet1 (so e.g. 30 nationality to exclude or include)

:?:
User avatar
Tradyann
 
Posts: 139
Joined: Thu Dec 15, 2011 7:13 pm

Postby Tradyann » Mon Feb 20, 2012 12:42 pm

e.g. I have write Dutch in cell Z1.

If (InStr(1, tBAEvents.key, "Over/Under", vbTextCompare) * InStr(1, tBAEvents.key, Cells(1, 26), vbTextCompare)) > 0 Then


With this line, I have only Dutch Over/Under market...

with "AND NOT"... all markets excluding Dutch.

But I don't know with more than one criteria ?
User avatar
Tradyann
 
Posts: 139
Joined: Thu Dec 15, 2011 7:13 pm

Postby alrodopial » Mon Feb 20, 2012 3:13 pm

If the problem is more than one criteria:
Code: Select all
If ... criteria 1 ....then
If ... criteria 2 ... then

etc

End If
End If
alrodopial
 
Posts: 1384
Joined: Wed Dec 06, 2006 9:59 pm

Postby faibo » Mon Feb 20, 2012 8:20 pm

I think that the best solution is to get both "soccer" and "soccer-fixtures" then compare them and use the "soccer" path in the "soccer-fixtures" list.

Using just the "soccer" tree is simple to pick by league and country with the code in this topic
User avatar
faibo
 
Posts: 23
Joined: Sun Sep 18, 2011 9:02 pm

Postby Tradyann » Mon Feb 20, 2012 9:05 pm

It's ok for me to select principle O/U of principle leagues (Barclays PL, Bundesliga 1, Serie A...)

Code: Select all
If InStr(1, tBAEvents.key, Cells(1, 26), vbTextCompare) > 0 Or InStr(1, tBAEvents.key, Cells(2, 26), vbTextCompare) > 0 Or InStr(1, tBAEvents.key, Cells(3, 26), vbTextCompare) > 0 Or InStr(1, tBAEvents.key, Cells(4, 26), vbTextCompare) > 0 Or InStr(1, tBAEvents.key, Cells(5, 26), vbTextCompare) > 0 Or InStr(1, tBAEvents.key, Cells(6, 26), vbTextCompare) > 0 Or InStr(1, tBAEvents.key, Cells(7, 26), vbTextCompare) > 0 Or InStr(1, tBAEvents.key, Cells(8, 26), vbTextCompare) > 0 Or InStr(1, tBAEvents.key, Cells(9, 26), vbTextCompare) > 0 Or InStr(1, tBAEvents.key, Cells(10, 26), vbTextCompare) > 0 Or InStr(1, tBAEvents.key, Cells(11, 26), vbTextCompare) > 0 Or InStr(1, tBAEvents.key, Cells(12, 26), vbTextCompare) > 0 Or InStr(1, tBAEvents.key, Cells(13, 26), vbTextCompare) > 0 Or InStr(1, tBAEvents.key, Cells(14, 26), vbTextCompare) > 0 Or InStr(1, tBAEvents.key, Cells(15, 26), vbTextCompare) > 0 Or InStr(1, tBAEvents.key, Cells(16, 26), vbTextCompare) > 0 Then
                                    If InStr(1, tBAEvents.key, "Over/Under", vbTextCompare) > 0 Then
                                    BAEvents.Add tBAEvents, tBAEvents.key
                                    On Error Resume Next
                                    eventcount = eventcount + 1
                                    Application.StatusBar = eventcount & " " & tBAEvents.key
                                    DoEvents
                                   
                                    End If
                                    End If




Maybe there is a better way :?
User avatar
Tradyann
 
Posts: 139
Joined: Thu Dec 15, 2011 7:13 pm

Postby heinz_pt » Mon Feb 27, 2012 7:34 pm

Hello Guys, i'm trying to use OverUnder Quickpicklist Excel, to get the Tennis - Set 01 Winner market QPL.
I've successfully, created the QPL, and even appears the markets when is extracting the list.

But when i try to reloaded to the BA, it doesn't load. I've selected 3 games of the Set 01 Winner markets and created a QPL, using the BA. And the id's are very different from the one's that the Excel macro extracted.

Any ideas?
heinz_pt
 
Posts: 24
Joined: Tue Feb 21, 2012 1:10 am

Postby Tradyann » Mon Feb 27, 2012 7:43 pm

I've sent you a PM
User avatar
Tradyann
 
Posts: 139
Joined: Thu Dec 15, 2011 7:13 pm

Postby Tradyann » Tue Mar 13, 2012 8:51 am

Hello,

"fetching markets" with excel files (for soccer, basket, ice hockey) doesn't work since 1 or 2 days.
For Tennis it's always ok.

I use the latest beta (1.1.0.66x83) and "fetching" worked well this last week-end with this beta.

Very strange...
:? :?:
User avatar
Tradyann
 
Posts: 139
Joined: Thu Dec 15, 2011 7:13 pm

Postby GaryRussell » Tue Mar 13, 2012 11:37 am

I tested the spreadsheets you sent and they are working ok here. Can you explain in detail where you think it is going wrong?
User avatar
GaryRussell
Site Admin
 
Posts: 9872
Joined: Fri Nov 18, 2005 8:09 pm
Location: Birmingham, UK

Postby Tradyann » Tue Mar 13, 2012 12:26 pm

a friend has the same problem as me.

When I click on button "fetching markets" nothing is found (no event).

I have tested without date research (like Tennis) and there's nothing either.

It's very strange because the same file works fine 2 days ago... and I haven't make any principal changes :?

The only thing i have changed is a profile export and deleting another.

I have tried BA_Clean_COM_Registry.exe and Delete_BA_Settings.exe given here : http://www.gruss-software.co.uk/forum/v ... =uninstall

I have uninstall re-install beta too..

:(
User avatar
Tradyann
 
Posts: 139
Joined: Thu Dec 15, 2011 7:13 pm

Postby GaryRussell » Tue Mar 13, 2012 2:27 pm

I'm afraid since it works on my PC I cannot tell you what is wrong. Surely if you debug your code you can see why it's not finding any markets? Did you write the code?
User avatar
GaryRussell
Site Admin
 
Posts: 9872
Joined: Fri Nov 18, 2005 8:09 pm
Location: Birmingham, UK

Postby Tradyann » Tue Mar 13, 2012 2:32 pm

No, Osknows has created this code. I'm not very good in VBA but I will try to see where is the problem.

Thks Gary
User avatar
Tradyann
 
Posts: 139
Joined: Thu Dec 15, 2011 7:13 pm

Postby GaryRussell » Tue Mar 13, 2012 3:08 pm

Just had a thought. You could try something quickly to rule out it being a language issue.

Login to Betfair's website and change your language to English then try it again. If it starts working it's because it cannot interpret the market data from the API correctly. I can help if this is the case.
User avatar
GaryRussell
Site Admin
 
Posts: 9872
Joined: Fri Nov 18, 2005 8:09 pm
Location: Birmingham, UK

Postby Tradyann » Tue Mar 13, 2012 3:14 pm

Yes Gary... I have just seen in my code with the spy that sports names was not in english... (change in my betfair account...) !

:D

Ouff ! 8)
User avatar
Tradyann
 
Posts: 139
Joined: Thu Dec 15, 2011 7:13 pm

Postby tom19235 » Thu Aug 16, 2012 9:11 pm

osknows wrote:This will fix it http://www.mediafire.com/?nbrx2nrxw3an3a1

It's your system locale changing the month to "déc" instead of "Dec"

Regards
Os



Link broken. Could you repost?
tom19235
 
Posts: 21
Joined: Mon Mar 12, 2012 1:53 am

Previous

Return to Help

Who is online

Users browsing this forum: No registered users and 49 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.