AJP Excel InformationAJP Excel Information
ChartsVBAFun stuffForumsTipsLinksBooksWhat's newContactAboutSearchRSS Feed

 
 
 

Userform Clock

You can adjust the hands by moving the mouse over the clock face.
The left button controls the hour hand while the right button controls the minute hand.
In both cases the other hand will adjust to reflect the current portion of the hour.
The trick to animating the hands is to use a collection of label controls for each hand. The close proximity of the labels give the illusion of a solid line.
The construction, positioning and drawing of the hands are all done within a class module.
   
 
I initial idea for this came for a post, Time Picker, on Dick Kusleika's blog Daily Dose of Excel
Example workbook
Alternative links

 

   

Last updated 11th August 2007

 
 
  Home | Charts | VBA Code | Fun Stuff
Forum Examples | Tips | Links | What's New | Book List
Contact | About
Microsoft® and Microsoft® Excel are registered trademarks of the Microsoft Corporation.
andypope.info is not associated with Microsoft. Copyright ©2007-2012 Andy Pope