Date of last file save

  • Thread starter Thread starter Guest
  • Start date Start date
I don't know if there is a built in one but you could try this custom
function

Function SaveTime()
Dim strFileName As String

strFileName = ThisWorkbook.Name
SaveTime = FileDateTime(strFileName)
End Function

Only problem is that when you save the spreadsheet you will have to
recalculate the sheet to get the function to update
 
Hi,
Put this in the VB editor for This Workbook

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As
Boolean)
Sheets("Sheet1").Range("A1").Value = Now
End Sub

The date and time will be entered into Sheet1, A1 each time the file is
saved. Format A1 as you wish.
Watch out for word wrap in the mail,

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As
Boolean)

should all be one line,
HTH
Alan.
Fran S said:
Is there an Excel function that will display the date of the last save or
file update?
 
For Excel 2000 and higher you can use this
ActiveWorkbook.BuiltinDocumentProperties("Last Save Time")

Note :
This is not working correct in Excel 97

Read this from Tom Ogilvy

Note that this property is not maintained in xl97. However, if the workbook
is created/used in both xl97 and later versions, then when used in the
later versions and saved the property is maintained but when used in xl97
and saved, the property is not altered. The time it was last saved in the
later version will be retrieved if this property is called. If created and
used exclusively in xl97, calling this property will raise an error. You
can use the beforesave event to update this property in xl97 as a
workaround. Just test the version of excel and if xl97, update the
property.
 
Back
Top