Moderator: 2020vision
by mak » Sun Jul 18, 2010 10:11 pm
by danjuma » Mon Jul 19, 2010 2:07 am
Captain Sensible wrote:mak something as simple as
Dim counter As Currency
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Columns.Count <> 16 Then Exit Sub
counter = counter + 1
If counter > 10 And [J3].Value = "L" Then
counter = 0
[Q2].Value = -5
ElseIf counter > 10 Then
counter = 0
[Q2].Value = -1
End If
End Sub
will continually loop through the markets every 10 refreshes, you just need to add further conditions within the code if you don't want it to move on until bets have been placed etc
by Captain Sensible » Mon Jul 19, 2010 8:26 am
mak wrote:I just can't understand how it counts, without be more specific, or without declare something like
for every refresh add 1
Don't know if i can make myself clear with this...
how the program "understand" that with counter+1 i mean every refresh?
Nevertheless, thanks Captain
by mak » Mon Jul 19, 2010 8:46 am
by Captain Sensible » Mon Jul 19, 2010 8:48 am
by Captain Sensible » Mon Jul 19, 2010 8:57 am
mak wrote:Dim counter As Currency
We now have a variable that will hold any value we want and that can be set or amended on each refresh by the program.
definitely not there yet..
Is there any other example within this code where we could set it to hold some more value(s).Not that i can think of something but could we have
Dim counter as Currency
Dim x as ?
...
counter = counter + 1
x=?
Captain if you get bored i will understand
by Captain Sensible » Mon Jul 19, 2010 9:13 am
by mak » Mon Jul 19, 2010 10:01 am
by Captain Sensible » Mon Jul 19, 2010 10:29 am
mak wrote:Hey Captain
Thanks for the lessons..
for the time being i can understand that for example with
Dim counter As Currency
counter = counter + 1....
excel can count each refresh because of the Worksheet_Change...and in mind is something generic and not specific
i can understand when (in others code) i see something
Dim lastrace As String
where somewhere in the code later you set it
lastrace = Cells(1, 1).Value
this is specific
dim something & set it later...
Are there any others no specific variables or something that we can hold their value or something beside refreshes of BA?
My answer would be no, but i know i can't answer the question...
by danjuma » Mon Jul 19, 2010 3:36 pm
by danjuma » Mon Jul 19, 2010 8:24 pm
Dim counter 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)
Range("Q2").Value = ""
Worksheets("Place").Range("Q2").Value = ""
If Worksheets("Place").Range("X1").Value = 0 And Worksheets("Place").Range("J3").Value <> "L" Then
Worksheets("Place").Range("Q2").Value = -1
Range("Q2").Value = -1
ElseIf Worksheets("Place").Range("X1").Value = 0 And Worksheets("Place").Range("J3").Value = "L" Then
Worksheets("Place").Range("Q2").Value = -5
Range("Q2").Value = -5
End If
If Range("X2").Value = 1 Then
counter = counter + 1
End If
If counter > 10 And Range("J3").Value = "L" Then
counter = 0
Range("Q2").Value = -5
ElseIf counter > 10 Then
counter = 0
Range("Q2").Value = -1
End If
End With
Application.EnableEvents = True
End Sub
by Captain Sensible » Mon Jul 19, 2010 10:18 pm
by danjuma » Mon Jul 19, 2010 11:28 pm
Dim counter 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)
If Range("X1").Value = 0 And Range("J3").Value <> "L" Then
Range("Q2").Value = -1
ElseIf Range("X1").Value = 0 And Range("J3").Value = "L" Then
Range("Q2").Value = -5
End If
If Range("X1").Value = 1 And Range("X2").Value = 0 And Range("J3").Value <> "L" Then
Range("Q2").Value = -1
Worksheets("Place").Range("Q2").Value = -1
ElseIf Range("X1").Value = 1 And Range("X2").Value = 0 And Range("J3").Value = "L" Then
Range("Q2").Value = -5
Worksheets("Place").Range("Q2").Value = -5
End If
If Range("X1").Value = 1 And Range("X2").Value = 1 Then
counter = counter + 1
End If
If counter > 10 And Range("J3").Value = "L" Then
counter = 0
Range("Q2").Value = -5
Worksheets("Place").Range("Q2").Value = -5
ElseIf counter > 10 Then
counter = 0
Range("Q2").Value = -1
Worksheets("Place").Range("Q2").Value = -1
End If
End With
Application.EnableEvents = True
End Sub
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.