what is this macro command doing ?

Please post any questions regarding the program here.

Moderator: 2020vision

what is this macro command doing ?

Postby brecki » Thu Sep 16, 2010 7:43 pm

Hi Gary,

you sent me a macro code earlier and I just want to understand one thing.

What is this macro doing, especially what is the meaning of the line


If Target.Columns.Count = 16 Then


?????????

Why is it exactly 16? When I change the number 16 to anything else, the macro seems not to work anymore, is that correct? I tried to find it out but didn´t find a logical explaination.


The complete macro code was:

Private Sub Worksheet_Change(ByVal Target As Range)

If Target.Columns.Count = 16 Then
Application.EnableEvents = False
calcGreenUp
Application.EnableEvents = True
End If
End Sub


Thx for helping. Regards Stefan
brecki
 
Posts: 44
Joined: Tue Aug 10, 2010 11:55 am

Postby GaryRussell » Thu Sep 16, 2010 7:58 pm

When Betting Assistant writes data to Excel it does it in ranges of cells. When it writes the odds the range includes columns A to P which is 16 columns. This is the best place to put your logic because when the column count is 16 it has just updated the odds.
User avatar
GaryRussell
Site Admin
 
Posts: 9872
Joined: Fri Nov 18, 2005 8:09 pm
Location: Birmingham, UK


Return to Help

Who is online

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