PDA

View Full Version : Real Time Clock in a Textbox on a Userform



Rlb53
10-02-2012, 06:56 PM
Anyone know how to display and capture "Real Time" on a Userform ?

I am currently using :


Private Sub UserForm_MouseMove(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
TextBoxTime.Value = Time
End Sub


to keep a textbox displaying the current time to record when an action is requested. This is pretty cool... and it works, but.. when the mouse rests... the textbox stops updating.

Will it fullfill my purpose? Absolutely. I just thought it would be neat if someone knew how to keep the time update continuous while the userform was open. Eventually a user will notice the time Starting and Stopping and my phone will be ringing.

Thanks

Simon Lloyd
10-02-2012, 08:45 PM
It's not really practicle but everything you need can be found here http://www.tushar-mehta.com/excel/software/vba_timer/

Rlb53
10-02-2012, 08:52 PM
Thank You Simon !
I'll check it out !