How do I insert the date the file was saved in the MS Excel foote.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to display the date the file was last saved in the footer field.
the defualt date code displays the date the file was printed. I would
appreciate any help with this.
 
You would need an event macro, for the workbook inquestion press Alt + F8,
to the left in the project pane find the workbook and double click
ThisWorkbook
and paste in the following

Private Sub Workbook_BeforePrint(Cancel As Boolean)
With ActiveSheet
.PageSetup.LeftFooter = "Document last saved on " & _
Format(ActiveWorkbook.BuiltinDocumentProperties("Last Save Time"), _
"dd mmm yyyy hh:mm")
End With
End Sub

press Alt + Q and save the workbook, if you only want the date and time and
not last saved one remove

"Document last saved on " &


Regards,

Peo Sjoblom
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top