Previously I had discussed about how to make an analog clock with piechart in excel. I am sharing the post link below.
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 Assign Macro window
2. Opening the VBA editor I added this code
Application.OnTime Now + TimeValue(“00:00:1”), “refreshcell”
3. Edited the button text and size just look 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.