Microsoft Office Tutorials and References
In Depth Information
=0.8*COS((MINUTE(NOW())+(SECOND(NOW())/60))*(2*PI()/
60))
J5
End of minute hand
Origin of second
hand
K5
=0.85*SIN(SECOND(NOW())*(2*PI()/60))
L5
End of second hand
=0.85*COS(SECOND(NOW())*(2*PI()/60))
This workbook uses a simple VBA procedure that schedules an event every second, which causes the formula
to recalculate.
In addition to the clock chart, the workbook contains a text box that displays the time using the NOW function,
as shown in Figure 17-21. Normally hidden behind the analog clock, you can display this text box by deselect-
ing the Analog Clock check box. A simple VBA procedure attached to the check box hides and unhides the
chart, depending on the status of the check box.
Figure 17-21: Displaying a digital clock in a worksheet is much easier but not as much fun to create.
The workbook with the animated clock example appears at this book's website. The file-
name is clock chart.xlsx.
When you examine the workbook, keep the following points in mind:
Search JabSto ::




Custom Search