Thread: Session Times
View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 6,953
Default Session Times

Just a thought, but wouldn't the workbook need to be saved to retain the
values?

--
Regards,
Tom Ogilvy


"Geoff K" wrote:

try something like this

put this into your ThisWorkBook module
Private Sub Workbook_Open()
With Sheets(1)
.Range("A1") = "Wbook opened at:"
.Range("A2") = Format(Now, "dd/mm/yyyy hh:mm:ss")
End With
End Sub

Private Sub Workbook_BeforeClose(Cancel As Boolean)
With Sheets(1)
.Range("B1") = "Last closed at:"
.Range("B2") = Format(Now, "dd/mm/yyyy hh:mm:ss")
End With
End Sub

hth

Geoff K

"will07" wrote:

Hello All,

Is it possible to add some code into a file that will show the session time
(in a cell)that a file is open or has been used.

thanks