41. Excel VBA Tutorial: Create a Digital Clock

In this step-by-step video, we’ll show you how to utilize Visual Basic for Applications (VBA) to build a fully functional digital clock within Microsoft Excel.
—————————————————————————————————————————————————
Dim DigitalClock As Date
Sub MakingClock()
With Sheet1.Range(“C4”)
.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
———————————————————————————————————————————————————

Related Posts

How to Subtract a Percentage in Microsoft Excel : Microsoft Word & Excel

How to Subtract a Percentage in Microsoft Excel : Microsoft Word & Excel

Subscribe Now: http://www.youtube.com/subscription_center?add_user=ehowtech Watch More: http://www.youtube.com/ehowtech Subtracting a percentage in Microsoft Excel is something that is accomplished by comparing the values of two distinct cells in a table. Subtract a percentage in Microsoft Excel with help from a professional programmer, designer, and developer in this free video clip. Expert: Geoph Essex Filmmaker: Victor Varnado Series…

Language »
close
Thanks !

Thanks for sharing this, you are awesome !