[Q2] = "GO:MarketID"

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

Moderator: 2020vision

[Q2] = "GO:MarketID"

Postby SenseiCRO » Sun Apr 29, 2012 9:13 pm

Hello,

I'm trying to access the exact market with the ID.
For that I use the following code that is logical to me, but it doesn't work:

If Not Worksheets("Test").Cells(1, 1).Value = 105518871 Then
[Q2] = "GO:105518871"
Worksheets("Test").Cells(1, 1).Value = 105518871
End If

It puts the GO:105518871 the Q2 cell, but BA doesn't go to that market at all, and my Excel goes into the infinite loop. I use IF to stop placing the Q2 request more than once, but... it stucks.

What am I doing wrong?
User avatar
SenseiCRO
 
Posts: 56
Joined: Mon Jun 06, 2011 8:53 pm

Postby GaryRussell » Mon Apr 30, 2012 8:55 am

Is this code in the Worksheet_Change event? Each time you write to a cell it fires this event so [Q2] = "GO:105518871" causes the event to fire again before the next statement. It is good practice to disable events when writing to cells. Try changing your code as follows.

Code: Select all
If Not Worksheets("Test").Cells(1, 1).Value = 105518871 Then
   Application.EnableEvents = False
   [Q2] = "GO:105518871"
   Worksheets("Test").Cells(1, 1).Value = 105518871
   Application.EnableEvents = True
End If
User avatar
GaryRussell
Site Admin
 
Posts: 9872
Joined: Fri Nov 18, 2005 8:09 pm
Location: Birmingham, UK

Postby SenseiCRO » Mon Apr 30, 2012 1:19 pm

Great, it works now, your suggestion has helped.
thank you for the excellent software and support.

cheers, dean
User avatar
SenseiCRO
 
Posts: 56
Joined: Mon Jun 06, 2011 8:53 pm


Return to Discussion

Who is online

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