So I need to display a real-time clock on my form but I am not sure how. I do know that the code:
TimeValue(Now)
will give me the current t
Excel has the OnTime method that allows you to schedule the execution of any procedure.
Just use it to schedule a one-second rhythm.
Sub DisplayCurrentTime()
Dim nextSecond As Date
nextSecond = DateAdd("s", 1, Now())
Label1.Caption = Now()
Application.OnTime _
Procedure:="DisplayCurrentTime", _
EarliestTime:=nextSecond, _
LatestTime:=nextSecond
End Sub
Start the loop by calling DisplayCurrentTime() once, for example in the initialize method of your form.