Hi All..
Meet me again and now I want show you how to create Analog O'clock with VBA Excel and I hope this can be help you to expand on your work.
Ok ladies and gentleman, now step by step begin to our practice.
Sheet1.Shapes("SECON").Rotation = X
Sheet1.Shapes("minute").Rotation = X
Sheet1.Shapes("hour").Rotation = X
Range("A1") = TimeValue(Now)
Range("B2") = Hour(Range("A1"))
Range("C2") = Minute(Range("A1"))
Range("D2") = Second(Range("A1"))
X = 0
Do
DoEvents
Range("A1") = TimeValue(Now)
Range("B2") = Hour(Range("A1"))
Range("C2") = Minute(Range("A1"))
Range("D2") = Second(Range("A1"))
DETIK (1)
Sheet1.Shapes("SECON").Rotation = Range("D3") + 6
Sheet1.Shapes("minute").Rotation = Range("C3")
Sheet1.Shapes("hour").Rotation = Range("B7")
Loop Until X = 360
End Sub
Sub Button2_Click()
End
End Sub
Sub DETIK(DET As Double)
xTimer = Timer
Do
DoEvents
Loop Until (Timer - xTimer) >= DET
End Sub
11.Design Fill picture with anything you want, I'm choose my picture Haha.. lol
Now enter formulas on cells as comment show
12.Analog O'clock finish and press Start button
Ok ladies and gentleman so tutorial from me hopefully useful and to meet in my other post, do not forget to vote me and thank you for your visit.