What is this clock for? This clock only shows the time, it is not used for anything. The change in P28 is not used to alarm that it is 11:00, 12:00 etc. because this change does not trigger Worksheet_Change
Who is telling you to change the UpdateClock sub? I wrote that you need to correct the send_mail sub because I do not know what you are sending and to which address. But at the end of the send_mail sub there must be UpdateClockin the corner that I can hide which keeps time to the second but that seems to trigger the send_mail code every second.Formula:![]()
Sub UpdateClock()
' Update the cell with the current time
With Sheet1.Range("A2") ' Change "Sheet1" and "A1" to your desired sheet and cell
.Value = Format(Now, "hh:mm:ss AM/PM")
End With
' Schedule the macro to run again in 1 second
Application.OnTime Now + TimeValue("00:00:01"),"UpdateClock",False
End Sub
![]()
UpdateClock End Sub
Bookmarks