How to create a Digital Clock using Excel, Here VBA code for creating a Digital Clock in Excel.
"Dim DigitalClock As Date
Sub MakingClock()
With Sheet1.Range("B4")
.Value = Format(Time, "hh:mm:ss AM/PM")
End With
Call SetTime
End Sub
Sub SetTime()
DigitalClock = Now + TimeValue("00:00:01")
Application.OnTime DigitalClock, "MakingClock"
End Sub
Sub Disable()
On Error Resume Next
Application.OnTime EarliestTime:=DigitalClock, Procedure:="MakingClock", Schedule:=False
End Sub"
Simply copy this code and paste in your VBA file.