Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
that works perfectly, thank you.
"JE McGimpsey" wrote: One way: Put this the ThisWorkbook Code module: Private Sub Workbook_Open() StartCounting bStart:=True End Sub Private Sub Workbook_BeforeClose(Cancel As Boolean) StopCounting End Sub Put this in a regular code module: Public dNextCall As Double Public Sub StartCounting(Optional bStart As Boolean = False) Const dINCREMENT As Date = #00:01:00# If Not bStart Then With Sheets("Sheet1").Range("A1") .Value = .Value + dINCREMENT End With End If dNextCall = Now + dINCREMENT Application.OnTime dNextCall, "StartCounting", Schedule:=True End Sub Public Sub StopCounting() Application.OnTime dNextCall, "StartCounting", Schedule:=False End Sub Change the Sheet and range, and the increment, to suit. In article , AJB wrote: I am a cost estimator who works on 2-12 bids a week and I want to add a timer to my template that simply counts up from zero while the workbook is open (and cumulatively each time opened) so I can compare my time usage vs. job profit estimated. I am a programming rookie, thanks for your assistance. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Is there a day timer template in word or excel? | Excel Discussion (Misc queries) | |||
template timer stopwatch | Excel Worksheet Functions | |||
Stopping a Timer / Running a timer simultaneously on Excel | Excel Discussion (Misc queries) | |||
Msg Box Timer | Excel Programming | |||
Timer | Excel Programming |