ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   When last saved? (https://www.excelbanter.com/excel-programming/354158-when-last-saved.html)

ph8[_30_]

When last saved?
 

Is there a way to pull a timestamp from an excel spreadsheet for whe
that spreadsheet was last saved?

If not? Is there a way to have excel update a timestamp cell PRIOR t
every time the spreadsheet gets saved?

Or even a VBA macro which runs prior to a save?

Basicaly I need a way to reliably pull the time stamp from when
spreadsheet was last saved.

Any thoughts

--
ph
-----------------------------------------------------------------------
ph8's Profile: http://www.excelforum.com/member.php...fo&userid=1987
View this thread: http://www.excelforum.com/showthread.php?threadid=51578


Jim Thomlinson[_5_]

When last saved?
 
Try this line...

MsgBox ThisWorkbook.BuiltinDocumentProperties("Last save time")
--
HTH...

Jim Thomlinson


"ph8" wrote:


Is there a way to pull a timestamp from an excel spreadsheet for when
that spreadsheet was last saved?

If not? Is there a way to have excel update a timestamp cell PRIOR to
every time the spreadsheet gets saved?

Or even a VBA macro which runs prior to a save?

Basicaly I need a way to reliably pull the time stamp from when a
spreadsheet was last saved.

Any thoughts?


--
ph8
------------------------------------------------------------------------
ph8's Profile: http://www.excelforum.com/member.php...o&userid=19871
View this thread: http://www.excelforum.com/showthread...hreadid=515783



ph8[_31_]

When last saved?
 

Perfect. Thanks Jim!

Now one more question, is there a way for an excel formula to return
the same result?


--
ph8
------------------------------------------------------------------------
ph8's Profile: http://www.excelforum.com/member.php...o&userid=19871
View this thread: http://www.excelforum.com/showthread...hreadid=515783


Art H

When last saved?
 
You could make a function out of Jim Thomlinson's code and call the
function in a cell.
Function strSaveDate() As String
If Len(ThisWorkbook.Path) < 0 Then
strSaveDate = ThisWorkbook.BuiltinDocumentProperties("Last save
time")
Else
strSaveDate = "Not saved"
End If
End Function
A1 = "=strSaveDate()"

The path test is used to determine the file exists--I'm sure there's a
better way.



All times are GMT +1. The time now is 06:29 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com