View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Jim May Jim May is offline
external usenet poster
 
Posts: 477
Default How can I capture the last date a file was saved in the footer

Paste this code into the THISWORKBOOK Module and then pick a cell (say A1)
that where you'd like for the date and time to appear and in it enter
=LastSaved


Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
ThisWorkbook.Names.Add Name:="LastSaved", _
RefersToR1C1:="=""" & _
Format(Now, "mmm-dd-yyyy hh:mm") & """"
End Sub

Jim May

"DNader" wrote:

I'm looking for a way to capture the date a file was last updated in an Excel
spreadsheet. If a file was last updated 3 days ago, I want to see that date,
not the date the file was printed.