If I would like to clear the bet results sheet , which is sheet2 on my workbook i read that I can use code -7 in VB
Now the question is how , does it work the same as the refresh quickpick :
- Code: Select all
Private Sub Workbook_Open()
If Hour(Now) >= 8 Then
Application.OnTime TimeValue("00:00:00"), "Clearbettingresults"
Else
Application.OnTime TimeValue("08:00:00"), "Clearbettingresults"
End If
End Sub
and then :
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Columns.Count = 16 Then
Application.EnableEvents = False
If triggerClearbettingresults Then
triggerClearbettingresults = False
Range("Q2:J500").Value = -7
End If
Application.EnableEvents = True
End If
End Sub
and then :
Public triggerClearbettingresults As Boolean
Public Sub Clearbettingresults()
triggerClearbettingresults = True
If Hour(Now) = 0 Then
Application.OnTime TimeValue("08:00:00"), "loadQuickPickList"
Else
Application.OnTime TimeValue("00:00:00"), "loadQuickPickList"
End If
End Sub
If the code is correct

Hopefully this is correct , it will make my day as it will be the first one

Cheers and thanx