I use the following code to implement a stopwatch:
It works correctly, but the problem I am having is that the screen "blinks" every time the ExcelStopWatch Sub is called to update the timer cell, i.e. once per second. I am trying to read comments underneath my mouse cursor during this time, and every time the clock updates, the comments "blink" off and on again, making them extremely difficult to read. Is it possible to disable this "blinking" that is affecting the comments?
Code:
Dim NextTick As Date
Dim t As Date
Dim PreviousTimerValue As Date
Sub StartTime()
PreviousTimerValue = Sheets("timer_test").Range("O2").Value
t = Time
Call ExcelStopWatch
End Sub
Sub ExcelStopWatch()
Sheets("timer_test").Range("O2").Value = Format(Time - t + PreviousTimerValue, "hh:mm:ss")
NextTick = Now + TimeValue("00:00:01")
Application.OnTime NextTick, "ExcelStopWatch"
End Sub
Sub StopClock()
On Error Resume Next
Application.OnTime earliesttime:=NextTick, procedure:="ExcelStopWatch", schedule:=False
End Sub
Sub Reset()
It works correctly, but the problem I am having is that the screen "blinks" every time the ExcelStopWatch Sub is called to update the timer cell, i.e. once per second. I am trying to read comments underneath my mouse cursor during this time, and every time the clock updates, the comments "blink" off and on again, making them extremely difficult to read. Is it possible to disable this "blinking" that is affecting the comments?