Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 172
Default how can i record how long a workbook is open?

Try this :

Private Sub Workbook_Open()
' This will log the Time Opened
With Sheet1
..Range("A1").Value = Now()
End With
End Sub


Private Sub Workbook_BeforeClose(Cancel As Boolean)
' This will Log the Time Closed and the Time WorkBook was opened in A3.
With Sheet1
..Range("A2").Value = Now()
..Range("A3").Value = .Range("A2").Value - Range("A1").Value
End With
MsgBox "This workBook was just Opened for " & Range("A3").Text
End Sub


Format A1-A3 as hhmmss


Corey....


If you set say A3 to Compare the difference in time difference in time would
be how long the workbook was last used for

"AJB" wrote in message
...
I am trying to roughly track time spent on our estimating process. Thanks!



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
Open new record with selected fields from previous record Design by Sue Excel Discussion (Misc queries) 1 June 12th 09 02:24 PM
Why does it take so long to open? Henry Excel Discussion (Misc queries) 4 May 22nd 09 07:08 PM
Workbook takes a long time to open (calculating), why? [email protected] Excel Programming 0 October 25th 06 10:16 PM
why taked so long to open an workbook on excel 2000? rafaelgon Excel Discussion (Misc queries) 0 April 28th 06 04:29 PM
Personal.xls won't open or record any more Jac Tremblay Excel Programming 2 May 29th 04 03:36 AM


All times are GMT +1. The time now is 12:53 PM.

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

About Us

"It's about Microsoft Excel"