I have an excel file which makes a regular DB query.
The results are entered into the Q and R column -- and each new query places the results in the next row.
It runs fine -- until row 64 is filled. ALL subsequent queries place the data back in row Q2 and R2 -- overwriting what is already in them.
I can't see any reason why it won't continue to row 65 and beyond.
Below is the macro code:
Public dTime As Date
Dim dTime As Date
Range("R" & Cells(Rows.Count).Row).End(xlUp).Offset(1, 0).Value = Range("o2").Value
Range("Q" & Cells(Rows.Count).Row).End(xlUp).Offset(1, 0).Value = Now
dTime = Now + TimeValue("00:15:00")
Application.OnTime dTime, "ValueStore", Schedule:=True
On Error Resume Next
Application.OnTime dTime, "ValueStore", Schedule:=False
Thanks for any help with this mystery!