Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Paul23
 
Posts: n/a
Default Stopping a Timer / Running a timer simultaneously on Excel

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)


  #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)



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel 2003 FAILS, but Excel 2000 SUCCEEDS ??? Richard Excel Discussion (Misc queries) 2 May 13th 23 11:46 AM
Delete row wise duplicates & colomun wise simultaneously excel Dipankar Excel Worksheet Functions 0 October 6th 05 01:14 PM
How do i create a running total in Excel? Marcus1 Excel Discussion (Misc queries) 2 August 24th 05 12:39 PM
How do I set up an automatic running average in Excel shantagor Excel Worksheet Functions 3 August 24th 05 07:48 AM
Excel 2000 running on Windows XP SP2 does not properly open CSV fi Oscar Excel Discussion (Misc queries) 1 December 20th 04 11:10 PM


All times are GMT +1. The time now is 09:51 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"