Moderator: 2020vision
by danjuma » Thu Apr 08, 2010 10:00 pm
by mak » Thu Apr 08, 2010 10:12 pm
by danjuma » Thu Apr 08, 2010 10:38 pm
Dim refreshCount As Integer
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Columns.Count <> 16 Then Exit Sub
Application.EnableEvents = False
With ThisWorkbook.Sheets(Target.Worksheet.Name)
refreshCount = 0
If refreshCount = 0 Then
Range("aa5:aa50").Value = Range("w5:w50").Value
End If
refreshCount = refreshCount + 1
End With
Application.EnableEvents = True
End Sub
by Captain Sensible » Fri Apr 09, 2010 1:54 pm
by danjuma » Fri Apr 09, 2010 3:40 pm
Captain Sensible wrote:Problem with your current code is that it's always resetting
refreshCount = 0
at the start of the coding , so refreshCount is always 0 and the code will continue to copy.
You need to be looking at whats the criteria for triggering that 'capture' and then stick the
refreshCount = 0
within that part of the code.
When is it meant to capture?
by Captain Sensible » Fri Apr 09, 2010 5:19 pm
by danjuma » Fri Apr 09, 2010 5:33 pm
Captain Sensible wrote:You could use something like WorksheetFunction.Sum(Range("W5:W50")) and reset the values when the market changes. You'd obviously miss any matches being logged after the first matched bet though
Dim refreshCount As Currency
Dim betCount As Currency
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Columns.Count <> 16 Then Exit Sub
Application.EnableEvents = False
With ThisWorkbook.Sheets(Target.Worksheet.Name)
betCount = WorksheetFunction.Sum(Range("W5:W50"))
If betCount = 0 Then
refreshCount = 0
Range("AA5:AA50").Value = ""
End If
If betCount > 0 And refreshCount < 1 Then
Range("aa5:aa50").Value = Range("w5:w50").Value
refreshCount = refreshCount + 1
End If
End With
Application.EnableEvents = True
End Sub
by danjuma » Fri Apr 09, 2010 5:36 pm
That's fine, just need to capture when the first bet(s) are placed.
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.