Hi guys,
I'm fairly new to macros and coding, but I want to do some stuff to simplify our work tracker.
I want to set a running timer, which I will use to track deadlines. I copied the code below online, but it's not showing the date properly. Changing the formatting shows the date as 01/01/1900. Is there a way to show the date today on this?
Dim SchedRecalc As Date
Sub Recalc()
With Sheet1.Range("H3")
.Value = Format(Time, "hh:mm:ss AM/PM")
End With
Call SetTime
End Sub
Sub SetTime()
SchedRecalc = Now() + TimeValue("00:00:01")
Application.OnTime SchedRecalc, "Recalc"
End Sub
Sub Disable()
On Error Resume Next
Application.OnTime EarliestTime:=SchedRecalc, Procedure:="Recalc", Schedule:=False
End Sub
For the next issue, I want to compare the value on the timer with the set deadlines. I want that with a click of the button, rows that are an hour before the deadline will change to orange. then set the format to red if they are over the deadline. Can anyone suggest a code for this?
Thanks in advance for your help.
Bookmarks