Lesson#81: Making an automatic analog clock in excel with a pie chart
Previously I had discussed how to make an analog clock with piechart in excel. I am sharing the post link below.
Lesson#61: Making a semi-analog clock with a pie chart
Now I will add some simple VBA to make the clock auto refreshed every second. So I have taken these simple steps.
1. From the Developer Tab I have inserted a Button (Form Control) and clicked on New in the Assign Macro window
2. Opening the VBA editor I added this code
Call refreshcell
End Sub
Sub refreshcell()
Range(“a1”).Calculate
Application.OnTime Now + TimeValue(“00:00:1”), “refreshcell”
End Sub
3. Edited the button text and the size just looks good.
4. Save this sheet as a macro-enabled workbook in .xlsm format.
Now see every second this sheet is auto-refreshing the clock. I put that button to call the function refreshcell()
if the sheet doesn’t start to refresh itself automatically after opening it.
Thx Mr.Puspendu Roy I really appreciate your work and love to read your post. thx for a giving this informative post on an excel automatic analog clock. I try it and really it’s work good… Best of luck!
Thank you very much