View Single Post
  #2   Report Post  
Bob Phillips
 
Posts: n/a
Default

Create a Public variable called nTime in a standard code module, and add
this code to your workbook

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As
Boolean)
With Worksheets("Sheet1").Range("a1")
.Value = .Value + (Now - nTime)
End With
End Sub

Private Sub Workbook_Open()
nTime = Now
End Sub

'This is workbook event code.
'To input this code, right click on the Excel icon on the worksheet
'(or next to the File menu if you maximise your workbooks),
'select View Code from the menu, and paste the code


--
HTH

Bob Phillips

"Charles1732" wrote in message
...
Does anyone know how to build a time clock into a worksheet that will

track
the cumulative time the worksheet is used for each opening and closing of

the
worksheet?
--
Charles1732