View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Tushar Mehta
 
Posts: n/a
Default Stopping a Timer / Running a timer simultaneously on Excel

Check out Chip Pearson's http://www.cpearson.com/excel/ontime.htm

As far as running multiple routines goes, it is possible but I would not
recommend it since XL/VBA are not designed with multi-threading in mind.

--
Regards,

Tushar Mehta
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions

In article , Paul23
@discussions.microsoft.com says...
Private Sub cmdstartimer2_Click()
startClock2
End Sub
Public Sub startClock2()

Dim start
Range("F7").Select
start = Timer

Do While stopped = False
DoEvents
Worksheets("Stopw").Range("F5").Value = Int((Timer - start + 0.5) / 60)
Worksheets("Stopw").Range("H5").Value = (Timer - start) Mod 60
Worksheets("Stopw").Range("I5").Value = (Timer - start + 0.5) - (Int(Timer -
start + 0.5))
Worksheets("Stopw").Range("D5").Value = Int((Timer - start + 0.5) / 3600)

Loop

End Sub

I am using this VBA Code to start a timer process. I Can run more than one,
but not simultaneously, and also I need a process to stop the timer. Can
anyone help???
Thanks (in advance)