by errolc » Mon Oct 17, 2022 12:35 pm
Hi
First experience - excellent app.
Am recording race odds for all runners every second using Excel 365 VBA, (health warning. Novice VBA status.
Have transposed Bet Assistant vertical data to a horizontal range (using formulae). This range is then copied to data recording area - the recording drops down a row every tim.
Works just fine, but.
It just stops after has recorded 60 rows ie 60 seconds.
The macro has no time or loop limitations.
[color=#0000BF]Sub ValueStore()
Dim dTime As Date
Dim AF(700) As Variant
Dim AG(700) As Variant
These are all named ranges in the 'data' area where odds are recorded. Span 600 rows.
Dim AX(700) As Variant
Dim AY(700) As Variant
Range("AF" & Cells(Rows.Count).Row).End(xlUp).Offset(1, 0).Value = Range("B28").Value
Range("AG" & Cells(Rows.Count).Row).End(xlUp).Offset(1, 0).Value = Range("C28").Value
Range("AH" & Cells(Rows.Count).Row).End(xlUp).Offset(1, 0).Value = Range("D28").Value
Range("AI" & Cells(Rows.Count).Row).End(xlUp).Offset(1, 0).Value = Range("E28").Value
Range("AJ" & Cells(Rows.Count).Row).End(xlUp).Offset(1, 0).Value = Range("F28").Value
Range("AK" & Cells(Rows.Count).Row).End(xlUp).Offset(1, 0).Value = Range("G28").Value
Range("AL" & Cells(Rows.Count).Row).End(xlUp).Offset(1, 0).Value = Range("H28").Value
Range("AM" & Cells(Rows.Count).Row).End(xlUp).Offset(1, 0).Value = Range("I28").Value
Range("AN" & Cells(Rows.Count).Row).End(xlUp).Offset(1, 0).Value = Range("J28").Value
Range("AO" & Cells(Rows.Count).Row).End(xlUp).Offset(1, 0).Value = Range("K28").Value
Range("AP" & Cells(Rows.Count).Row).End(xlUp).Offset(1, 0).Value = Range("L28").Value
Range("AQ" & Cells(Rows.Count).Row).End(xlUp).Offset(1, 0).Value = Range("M28").Value
Range("AR" & Cells(Rows.Count).Row).End(xlUp).Offset(1, 0).Value = Range("N28").Value
Range("ASS" & Cells(Rows.Count).Row).End(xlUp).Offset(1, 0).Value = Range("O28").Value
Range("AT" & Cells(Rows.Count).Row).End(xlUp).Offset(1, 0).Value = Range("P28").Value
Range("AU" & Cells(Rows.Count).Row).End(xlUp).Offset(1, 0).Value = Range("Q28").Value
Range("AV" & Cells(Rows.Count).Row).End(xlUp).Offset(1, 0).Value = Range("R28").Value
Range("AW" & Cells(Rows.Count).Row).End(xlUp).Offset(1, 0).Value = Range("S28").Value
Range("AX" & Cells(Rows.Count).Row).End(xlUp).Offset(1, 0).Value = Range("T28").Value
Range("AY" & Cells(Rows.Count).Row).End(xlUp).Offset(1, 0).Value = Range("U28").Value
Call StartTimer
End Sub
Sub StartTimer()
dTime = Now + TimeValue("00:00:01")
Application.OnTime dTime, "ValueStore", Schedule:=True
End Sub[/color]
Is the above all silly?
Is there an Excel setting I should tweak?
I can't find a solution on the web, although another guy had the same problem using a different data source and app. The original script writer was baffled.
Thanks - Errol