View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.newusers
Paul C Paul C is offline
external usenet poster
 
Posts: 269
Default Insert last saved date into header

This will populate the header of each sheet with the last saved date each
time the workbook is opened. This does need to go in a module and not on an
individual sheet.

Sub Auto_Open
Dim Last_Saved as Date
wscount=Activeworkbook.Worksheets.Count
Last_Saved= Application.Caller.Parent.Parent. _
BuiltinDocumentProperties("Last Save Time").Value
For A=1 to wscount
With Sheets(A).PageSetup
.LeftHeader = Last_Saved
End With
Next A

End Sub

--
If this helps, please remember to click yes.


"Amy" wrote:

I am using Excel 2003. I created a Macro with the following custom function:

Function Last_Saved_Date()
Last_Saved_Date = Application.Caller.Parent.Parent. _
BuiltinDocumentProperties("Last Save Time").Value
End Function

Then in a cell in the worksheet, I have it as "=Last_Saved_Date()" and I
make sure to format the cell in a date format.

Doing this, I am able to see the last saved date inside the worksheet.

My questions are the following:

1. How do I have the header print at the top of each page, the last saved
date of the file? May I use the contents of my Last Saved Date cell?
2. Is there a more efficient way to do this in the header without using this
macro?

Thank you for your help,
Amy