Thread: Time Function
View Single Post
  #4   Report Post  
Paga Mike Paga Mike is offline
Junior Member
 
Location: Lakehurst, NJ, USA
Posts: 19
Default

Quote:
Originally Posted by View Post
On Tuesday, September 11, 2012 3:36:34 PM UTC-4, (unknown) wrote:
Are there other functions beside NOW() that I can use to have the correct time displayed in a cell ?


For some reason it does not update all the time - there are pauses in the updates. So I'm looking for a time function that reflects the current time (hh:mm:ss) continuosly over the course of the day.
To get a cell (say B9) to display an updating time, run the StartClock macro listed below:

Dim PleaseStopMe As Boolean

Sub StopIt()
PleaseStopMe = True
End Sub

Sub StartClock()
PleaseStopMe = False
Do
Range("B9").Value = Format(Now, "hh:mm:ss")
DoEvents
If PleaseStopMe Then Exit Sub
Loop
End Sub

To stop the clock, run the StopIt macro