Quote Originally Posted by Coltara View Post
the result is that when P28 (current time) reaches say 12:00 then all of the site numbers of all the sites that have a shift that starts at that time that day (from the table I created on another sheet in the workbook) will be listed. So if there is more than one site it spills over into the cells below. P28 has the
Formula: copy to clipboard
=time(hour(now()),minute(now()),0)
and will also only stay current if there is a change in the workbook so i usually use a VBA macro to put a digital clock
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
Formula: copy to clipboard
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
in the corner that I can hide which keeps time to the second but that seems to trigger the send_mail code every second.
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 UpdateClock

	UpdateClock
End Sub