inserting date from when file was modified

  • Thread starter Thread starter montecarlo
  • Start date Start date
M

montecarlo

Trying to make my spreadsheet easier to update I would like th
spreadsheet to automatically look at when the file was last saved an
insert that date into a cell. Basically, if I update the spreadshee
on 1/1/2004 I would rather have the spreadsheet insert that dat
instead of me typing it in.

Do I have to use some sort of visual basic macro to do this or ar
there any worksheet functions I can use?

Thank
 
Hi Montecarlo!

One way you might consider is to use a Workbook_BeforeSave event
handler:

Private Sub Workbook_BeforeSave(ByVal _
SaveAsUI As Boolean, Cancel As Boolean)
Sheets(1).Range("A1") = "Last saved " & Now
End Sub

This goes in the ThisWorkbook module.


--
Regards
Norman Harker MVP (Excel)
Sydney, Australia
(e-mail address removed)
Excel and Word Function Lists (Classifications, Syntax and Arguments)
available free to good homes.
 
Back
Top