View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jacob Skaria Jacob Skaria is offline
external usenet poster
 
Posts: 8,520
Default Elapsed times 24hrs

Try

Sub RClock1()

Watch = Now - Sheets("Timing Sheet").Range("B6")
UserForm1.RaceClock1.Text = Worksheetfunction.text(Now - _
Sheets("Timing Sheet").Range("B6"),"[h]:mm:ss")
NextTick = Now + TimeValue("00:00:01")
Application.OnTime NextTick, "RClock1"
End Sub

If this post helps click Yes
---------------
Jacob Skaria


"NDBC" wrote:

I have the following code for a timer on a form. the time in cell b6 is the
start time of the race. I want it to work for races that go for than 24
hours. I have tried formatting it as "[hh]:mm:ss" but the hours disappear and
the timer starts at 8 minutes for some reason regardless of what the start
time is. Any ideas.

Thanks

Sub RClock1()

Watch = Now - Sheets("Timing Sheet").Range("B6")
UserForm1.RaceClock1.Text = Format(Watch, "hh:mm:ss")
NextTick = Now + TimeValue("00:00:01")
Application.OnTime NextTick, "RClock1"
End Sub