Moderator: 2020vision
by vanbuuts » Mon Feb 15, 2021 12:33 pm
by Captain Sensible » Mon Feb 15, 2021 3:21 pm
With Target.Parent
If .Range("D2").Value <= TimeValue("00:05:00") And .Range("K1").Value <> "FO" Then
.Range("Q2").Value = "FULL-STREAM-ON"
ElseIf .Range("D2").Value >= TimeValue("00:05:00") And .Range("K1").Value = "FO" Then
.Range("Q2").Value = "FULL-STREAM-OFF"
End If
End With
If .Range("D2").Value >= TimeValue("00:05:00") Then Exit Sub
by Captain Sensible » Mon Feb 15, 2021 3:29 pm
With Target.Parent
If .Range("D2").Value <= TimeValue("00:05:00") And .Range("K1").Value <> "FO" Then
.Range("Q2").Value = "FULL-STREAM-ON"
ElseIf .Range("D2").Value >= TimeValue("00:05:00") And IsNumeric(.Range("D2").Value) And .Range("K1").Value = "FO" Then
.Range("Q2").Value = "FULL-STREAM-OFF"
End If
End With
by vanbuuts » Mon Feb 15, 2021 8:56 pm
by vanbuuts » Fri Feb 19, 2021 12:38 pm
Captain Sensible wrote:Y
A lot of the time it's actually easier to simply exit your worksheet_change routine early before any code is run
- Code: Select all
If .Range("D2").Value >= TimeValue("00:05:00") Then Exit Sub
Or goTo the end of the code to swerve any intensive/unnecessary code depending what your bot is doing
by Captain Sensible » Sat Feb 20, 2021 2:41 am
by Captain Sensible » Sat Feb 20, 2021 2:44 am
by Captain Sensible » Sat Feb 20, 2021 2:49 am
by vanbuuts » Sat Feb 20, 2021 9:52 am
Captain Sensible wrote:Maybe it's just a case of where you're placing the code. If your code turns off events and you exit before turning it back on that will cause problems too
Option Explicit
Dim currentMarket As String, marketSelected As Boolean
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Columns.Count = 16 Then
Application.EnableEvents = False
If [A7] <> currentMarket Then marketSelected = False
currentMarket = [A7]
If [AB2] = "OK" And Not marketSelected Then
marketSelected = True
ThisWorkbook.Sheets("R1").Select
[Q8] = -1
End If
Application.EnableEvents = True
End If
If Target.Columns.Count = 16 Then
Application.EnableEvents = False
If triggerQuickPickListReload(1) Then
triggerQuickPickListReload(1) = False
Range("Q8").Value = -3
triggerFirstMarketSelect(1) = True
Else
If triggerFirstMarketSelect(1) Then
triggerFirstMarketSelect(1) = False
Range("Q8").Value = -5
End If
End If
Application.EnableEvents = True
End If
End Sub
by Captain Sensible » Sat Feb 20, 2021 12:47 pm
by vanbuuts » Sat Feb 20, 2021 12:53 pm
by Captain Sensible » Mon Feb 22, 2021 3:24 pm
If Target.Columns.Count = 16 Then
Worksheets("Sheet1").Range("D8").Value <= TimeValue("00:05:00")
IsNumeric(Worksheets("Sheet1").Range("D8").Value)
If (Worksheets("Sheet1").Range("D8").Value <= TimeValue("00:05:00") Or IsNumeric(Worksheets("Sheet1").Range("D8").Value)) And Target.Columns.Count = 16 Then
by Captain Sensible » Mon Feb 22, 2021 3:30 pm
If (Worksheets("Sheet1").Range("D8").Value <= TimeValue("00:05:00") Or Application.WorksheetFunction.IsText(Worksheets("Sheet1").Range("D8").Value)) And Target.Columns.Count = 16 Then
by Captain Sensible » Mon Feb 22, 2021 4:06 pm
Option Explicit
Dim currentMarket As String, marketSelected As Boolean
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Columns.Count = 16 Then
Application.EnableEvents = False
'slot in here
If Worksheets("Sheet1").Range("D7").Value <= TimeValue("00:05:00") Or Application.WorksheetFunction.IsText(Worksheets("Sheet1").Range("D7").Value) Then
Worksheets("Sheet1").Range("Q8").Value = 0.2 'fast refresh
Else
Worksheets("Sheet1").Range("Q8").Value = 10 'slow refresh
End If
'slot in here
If [A7] <> currentMarket Then marketSelected = False
currentMarket = [A7]
............................rest of code
by Captain Sensible » Mon Feb 22, 2021 4:11 pm
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.