Last Save Date

K

Kurchian

I would like to have a cell which displays the date of the last date the file was saved.

Is this possible?
 
D

Don Guillett

right click the excel icon just to the left of file>view code>left window
workbook>right window>before close
range("a1")=date
 
R

Ron de Bruin

Hi Kurchian

Copy this event in the Thisworkbook module

Right click on the Excel icon next to File in the menubar
choose view code
paste it in there
Alt-Q to go back to Excel


Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, _
Cancel As Boolean)If you save the file the date will be placed in cell A1of Sheet1
Sheets("Sheet1").Range("a1").Value = Date
End Sub
 
R

Ron de Bruin

Look out for line wrap

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, _
Cancel As Boolean)
'If you save the file the date will be placed in cell A1 of Sheet1
Sheets("Sheet1").Range("a1").Value = Date
End Sub
 
K

Kurch

I have tried and tried to implement the suggestions that the two respondents have suggested

Would someone be kind enough to give me a step by step solution

I cannot get it to work

thanks so much
 
D

Don Guillett

Ron did just that.
right click on the excel icon to the left of FILE on the top toolbar>click
on view code>in the left window select workbook>in the right window select
before_save. copy/paste this macro there.Save the workbook.

Sheets("Sheet1").Range("a1") = Date

Now each time the workbook is saved the date will be placed in cell a1 on
sheet1.
 
K

Kurch

Thanks for all the help, I finally have the Last Save date working

My next step is to have a last save date listed inside a header or footer. Is that possible?
 
Top