Forum Discussion
Automatic Date Update (No Interaction)
Hi ldcox8551,
Alternatively, you can add a clock in your spreadsheet with a macro. This will write the current date in cell A1 and current date in cell A2. Since it refresh every second, your spreadsheet will recalculate every second. Execute "SetTime" to start the process and "Disable" to stop the process.
Dim SchedRecalc As Date
Sub Recalc()
With Sheet1.Range("A1")
.Value = Format(Date)
End With
With Sheet1.Range("A2")
.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
P.S. I copied this macro from another source.