RINCONPAUL
06-17-2016, 03:09 PM
I have a workbook that is fed horse race data and prices from a 3rd party software. The 3rd party software selects the races and loads them to the workbook 1 minute out from the official race starting time. The current race data is imported into sheet "BOTT". Each race has a specific number of runners, and I'm only interested in fields of 5....13 runners. In the workbook there are field size specific sheets called "Interface5".....13 and past data sheets, similarly "Data5"....13.
Each one of these "Interface" sheets is an Advanced Filter and becomes active if the current race displayed in sheet "BOTT" matches it's field size number. Let's say there is a 7 runner race current, therefore "Interface7 is being populated with ever changing prices. At the official start time for that race I manually trigger a macro button on the "Interface7" sheet called "FilterMe7". The advanced filter does it's thing, and references current prices to the attached "Data7" sheet and returns a betting strategy. I then press macro button "Clearme7" on the "Interface" sheet. The code for those two macro buttons is below. Each "Interface" sheet has a unique code for those two buttons per sheet.
The purpose of this post is to ask the question, "Is there a way to have the Advanced Filter macro updating (triggering) every second while that particular interface sheet is current and active?" This would save me having to manually trigger the event and would be useful as many races (especially USA) over run their start times, so the betting strategy can change markedly, from official start to actual start time. The macro would have to clear the sheet and be dormant when another race is loaded on the "BOTT" sheet, setting off another advanced filter loop.
Sub FilterMe7()
'
' FilterMe7 Macro
'
'
Sheets("DATA7").Range("A1").CurrentRegion.AdvancedFilter Action:=xlFilterCopy, _
CriteriaRange:=Range("U10:AH11"), CopyToRange:=Range("A13:Q13"), Unique:= _
False
End Sub
Sub Clearme7()
'
' Clearme Macro
'
'
Range("A14:Q10000").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.ClearContents
End Sub
Each one of these "Interface" sheets is an Advanced Filter and becomes active if the current race displayed in sheet "BOTT" matches it's field size number. Let's say there is a 7 runner race current, therefore "Interface7 is being populated with ever changing prices. At the official start time for that race I manually trigger a macro button on the "Interface7" sheet called "FilterMe7". The advanced filter does it's thing, and references current prices to the attached "Data7" sheet and returns a betting strategy. I then press macro button "Clearme7" on the "Interface" sheet. The code for those two macro buttons is below. Each "Interface" sheet has a unique code for those two buttons per sheet.
The purpose of this post is to ask the question, "Is there a way to have the Advanced Filter macro updating (triggering) every second while that particular interface sheet is current and active?" This would save me having to manually trigger the event and would be useful as many races (especially USA) over run their start times, so the betting strategy can change markedly, from official start to actual start time. The macro would have to clear the sheet and be dormant when another race is loaded on the "BOTT" sheet, setting off another advanced filter loop.
Sub FilterMe7()
'
' FilterMe7 Macro
'
'
Sheets("DATA7").Range("A1").CurrentRegion.AdvancedFilter Action:=xlFilterCopy, _
CriteriaRange:=Range("U10:AH11"), CopyToRange:=Range("A13:Q13"), Unique:= _
False
End Sub
Sub Clearme7()
'
' Clearme Macro
'
'
Range("A14:Q10000").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.ClearContents
End Sub