Make Watch in Excel VBA use of ONTIME Function

Making Watch In Excel Vba

 

From below vba code & video you can learn how to make watch in excel vba use on ontime VBA Function.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Click Here to Download File

Sub makingwatch()
Dim cancel As Boolean
If Range(“k1”).Value = True Then
Exit Sub
Else
snd = Second(Now)
minute1 = Minute(Now)
hour_a = Hour(Now)
Sheet1.Shapes.Range(Array(“snd_2”)).Rotation = 6 * snd
Sheet1.Shapes.Range(Array(“minute_1”)).Rotation = 6 * minute1 + snd / 60
Sheet1.Shapes.Range(Array(“hour_2”)).Rotation = 30 * hour_a + minute1 / 60 * 30
Application.OnTime Now() + TimeSerial(0, 0, 1), “makingwatch”
End If
End Sub
Sub Start_1()
Range(“k1”).Value = False
Dim cancel As Boolean
cancel = False
makingwatch
End Sub
Sub stop_1()
Range(“k1”).Value = True
Dim cancel As Boolean
cancel = False
makingwatch
End Sub

Click Here to Download File

Leave a Reply

Your email address will not be published. Required fields are marked *