by Rinconpaul » Mon Jun 19, 2017 11:11 am
This code is not working, any ideas?
Thanks
Private MyMarket As String
Private InPlay As Boolean
Private RefreshCount As Long
Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
Application.Calculation = xlCalculationManual
Select Case Target.Columns.Count
Case 16 'odds and market info update
'check to see if market changed
If Range("A1").Value = MyMarket Then
RefreshCount = RefreshCount + 1
Else
MyMarket = Range("A1").Value
RefreshCount = 1
InPlay = False
End If
'waits 1 second, calls macro if "In Play"
If RefreshCount > 2 And Range("E2") = "In Play" And Range("F2") <> "Suspended" Then
Application.Wait Now + TimeSerial(0, 0, 1)
Call Copy_Race
End If
Application.EnableEvents = True
Application.Calculation = xlCalculationAutomatic
End Select
End Sub