I guess the lines I added can get the job right. the change in color is a condition just to avoid the message to be repeated indefinitely
If ThisWorkbook.Worksheets(1).Range("B1").Value = "X" Then Exit Sub
ThisWorkbook.Worksheets(1).Range("A1").Value = Format(Now, "hh:mm:ss AM/PM")
i = 2
Do
If (Cells(i, 4) - Cells(1, 1)) <= 0 And Cells(i, 4).Interior.Color = 15773696 Then
MsgBox ("Time #" & (i - 1) & " has come")
Cells(i, 4).Interior.Color = 255
End If
i = i + 1
Loop Until Cells(i, 4) = ""
Application.OnTime Now + TimeSerial(0, 0, 1), "clock"
Bookmarks