Moderator: 2020vision
by Captain Sensible » Thu Jul 27, 2017 5:44 pm
by Captain Sensible » Thu Jul 27, 2017 8:46 pm
Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)
Static MyMarket As String, Streaming As String, exitingMarket As String
Dim rowFindLast As Integer
If Target.Columns.Count <> 16 Then Exit Sub
Application.EnableEvents = False
With Target.Parent
'Let's display the status whilst developing''
.Range("S1").Value = "Your code has stopped"
.Range("S2").Value = "Exciting market : " & exitingMarket
.Range("S3").Value = "Streaming is " & Streaming
'''''Just delete or comment out when no longer needed '''''
' Let's set up the new market
If .Range("A1").Value <> MyMarket Then GoTo marketSetup
' Let's set up the new market
' simple routine to move between markets
If (.Range("E2").Value = "In Play" And .Range("F2").Value <> "") Or .Range("F2").Value = "Closed" Then
If exitingMarket = "NO" Then .Range("Q2").Value = -1
exitingMarket = "YES"
GoTo xit: ' no point running thru the rest of our code
ElseIf .Range("E2").Value = "In Play" Then
If Streaming <> "ON" Then Streaming = "ON": .Range("Q2").Value = "FULL-STREAM-ON"
Else
If Streaming <> "OFF" Then Streaming = "OFF": .Range("Q2").Value = "FULL-STREAM-OFF"
End If
' simple routine to move between markets
'your main code routines can go in here
xit:
Application.EnableEvents = True
.Range("S1").Value = "Enable Events is " & Application.EnableEvents
End With
Exit Sub
marketSetup: 'let's cleanup from the previous market and reset any variables
With Target.Parent
MyMarket = .Range("A1").Value
exitingMarket = "NO"
Streaming = ""
rowFindLast = LastRow(.Range("Q:U"), 0)
.Range("Q2,Q5:U" & rowFindLast).Value = ""
Application.EnableEvents = True
.Range("S1").Value = "Enable Events is " & Application.EnableEvents
End With
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.