Thread: Session Times
View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Geoff K Geoff K is offline
external usenet poster
 
Posts: 66
Default Session Times

Another solution as it fits your criteria (in a cell) can be found here with
Bob Philip's respons
http://www.microsoft.com/communities...6-35646daae260

hth

Geoff K

"Geoff K" wrote:

That's true and on reflectiion I think my interpretation of "has been used"
is not what the op was wanting. Gary's solution is of course on the mark for
the current session which is most probably what was required though it does
not provide for history.

Geoff K

"Tom Ogilvy" wrote:

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