how do I insert "last saved date" in as a field in excel?

G

Guest

I'm trying to enter into excel (probably in the footer) the field "last saved
date" but can't seem to find the formula or the field. In word, I think the
function is "savedate". Does anyone know the answer to this?
 
G

Guest

Thanks Ron de Bruin,
I tried that but it didn't seem to print the last saved date for me. Is
there something I'm supposed to specifically do to invoke that private sub?
 
R

Ron de Bruin

Hi chirag

When you print it will add it in the Footer
Have you copy it in the Thisworkbook module of the workbook ?


Right click on the Excel icon next to File in the Worksheet menu bar
Choose view code
Paste this event there
Alt-q to go back to Excel Private Sub Workbook_BeforePrint(Cancel As Boolean) Dim wkSht As Worksheet
For Each wkSht In ThisWorkbook.Worksheets
wkSht.PageSetup.RightFooter = "&8Last Saved : " & _
Format(ThisWorkbook.BuiltinDocumentProperties("Last Save Time"), _
"yyyy-mmm-dd hh:mm:ss")
Next wkShtEnd Sub
 
G

Guest

Many thanks for your replies, Ron.

Ok, so it works when I add it to Thisworkbook, but not the personal.xls
module. I was hoping that I could do this via a macro on every spreadsheet I
open up. I wasn't successful at getting my macro to work, and doing this
step manually for every workbook doesn't seem to be the most efficient
solution.

Any other ideas?
 

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

Top