In my VBA code in Excel, I am using the following function to call the Windows API setTimer
Sub StartTimer()
TimerSeconds = 300 ' how often to "pop" the timer.
TimerID = SetTimer(0&, 0&, TimerSeconds * 1000&, AddressOf TimerProc)
End Sub
I have only recently added this to my code. Previously I was just using an Excel timer.
Since changing the code I have had a few exception errors in Excel.
Could using the Windows API timer be causing these errors?
For example, if the Windows timer is not properly stopped (whilst debugging the code), would starting the timer again cause an exception error?
Any help on this would be very much appreciated.
Thanks.
Sub StartTimer()
TimerSeconds = 300 ' how often to "pop" the timer.
TimerID = SetTimer(0&, 0&, TimerSeconds * 1000&, AddressOf TimerProc)
End Sub
I have only recently added this to my code. Previously I was just using an Excel timer.
Since changing the code I have had a few exception errors in Excel.
Could using the Windows API timer be causing these errors?
For example, if the Windows timer is not properly stopped (whilst debugging the code), would starting the timer again cause an exception error?
Any help on this would be very much appreciated.
Thanks.