Hi!

I used the next code to have a running clock in one of my workbooks:

In Module1:

Dim TimerActive As Boolean
Sub StartTimer()
Start_Timer
End Sub
Private Sub Start_Timer()
TimerActive = True
Application.OnTime Now() + TimeValue("00:00:30"), "Timer"
End Sub
Private Sub Stop_Timer()
TimerActive = False
End Sub
Private Sub Timer()
If TimerActive Then
ActiveSheet.Cells(2, 4).Value = Time
Application.OnTime Now() + TimeValue("00:00:30"), "Timer"
End If
End Sub


and as ThisWorkbook:

Private Sub Workbook_Open()
Module1.StartTimer
End Sub




The Problem is that now, when the workbook is closed and another excel is running, every time when the clock is update (I assume) it opens up the workbook with the clock. How do I stop it?

Another question is - how do I limit the presence of the clock to a specific worksheet. after setting the running clock it appeared all over the workbook, in every single sheet.