LAY input by Macro

Please post any questions regarding the program here.

Moderator: 2020vision

LAY input by Macro

Postby Shaun » Thu Sep 02, 2010 3:47 am

Hi,
i am using this macro
Code: Select all
Sub lay()
Sheets("Control").Range("AN13:AO13").Value = "LAY"
Application.Wait Now + TimeSerial(0, 0, 3)
Sheets("Control").Range("AN13:AO13").Value = ""
End Sub

to pupulate 2 cells i then have 2 BA sheets linked to these cells to place the bets, yet when i run macro it populates the BA sheet with LAY but nothing happens, if i do it manualy it works.

Do i need to activate these cells for it to work?
Shaun
 
Posts: 435
Joined: Fri May 09, 2008 11:11 pm
Location: Kellerberrin, Western Australia

Postby GaryRussell » Thu Sep 02, 2010 6:33 am

BA cannot interact with Excel when code is running. Your code is inserting LAY, waiting for 3 seconds then clearing the cells. BA will never see LAY in the trigger cells as it will only get the opportunity to read the trigger cells at the end of your sub when the cells are blank.
User avatar
GaryRussell
Site Admin
 
Posts: 9872
Joined: Fri Nov 18, 2005 8:09 pm
Location: Birmingham, UK

Postby milfor » Thu Sep 02, 2010 11:18 am

The easiest solution is deleting the third and fourth line of your macro.
Deleting the LAY afterwards is not necessary. The bet won't be triggered
more than once because the LAY is not active as soon as the Bet ref column
is filled.
milfor
 
Posts: 437
Joined: Mon Jun 26, 2006 1:44 am


Return to Help

Who is online

Users browsing this forum: Google [Bot] and 32 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.