J
J.W. Aldridge
The following formula works fine to give me the clock i need however:
The clock seems to prevent me from closing the workbook.
I have it set to run on open to ensure that it is running properly.
(2nd sub)
How do i stop from running this on workbook close?
Sub clock()
If ThisWorkbook.Worksheets(1).Range("e22").Value = "X" Then Exit Sub
ThisWorkbook.Worksheets(1).Range("e21").Value = Format(Now, "hh:mm:ss
AM/PM")
Application.OnTime Now + TimeSerial(0, 0, 1), "clock"
End Sub
Private Sub Workbook_Open()
Application.Run "clock"
End Sub
The clock seems to prevent me from closing the workbook.
I have it set to run on open to ensure that it is running properly.
(2nd sub)
How do i stop from running this on workbook close?
Sub clock()
If ThisWorkbook.Worksheets(1).Range("e22").Value = "X" Then Exit Sub
ThisWorkbook.Worksheets(1).Range("e21").Value = Format(Now, "hh:mm:ss
AM/PM")
Application.OnTime Now + TimeSerial(0, 0, 1), "clock"
End Sub
Private Sub Workbook_Open()
Application.Run "clock"
End Sub