I have an application where I need to do a web query every minute. I
got some code out of the book "Excel Hacks" which initially worked but
now runs the macro twice in the same minute. No matter what I do, I
can't seem to change this. This is my code:
In "ThisWorkbook":
Private Sub Workbook_BeforeClose(Cancel As Boolean)
End Sub
Application.OnTime dTime, "Get_Financial", , False
End Sub
Private Sub Workbook_Open()
End Sub
Application.OnTime Now + TimeValue("00:01:00"), "Get_Financial"
End Sub
In the module:
Sub Get_Financial()
Dim Index As Integer
dTime = Now + TimeValue("00:01:00")
Application.OnTime dTime, "Get_Financial"
I would much appreciate any ideas.