Excel - How do I display the last updated date in the page header?

Asked By AgingHippi on 18-Jul-08 03:48 PM
I need to display the date the workbook was last modified in the page header
when it is printed.

Mike replied on 18-Jul-08 03:58 PM

Alt + F11 to open VB editor. Double click 'This workbook' and paste this in
on the right. Change the range to suit.

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
Sheets("Sheet1").Range("A1").Value = _
End Sub

Gord Dibben replied on 18-Jul-08 04:31 PM
There is no "modified" property

Best you can get is last saved time.

Sub printit()
ActiveSheet.PageSetup.RightHeader = "&8Last Saved : " & _
Format(ThisWorkbook.BuiltinDocumentProperties("Last Save Time"), _
End Sub

Gord Dibben  MS Excel MVP

On Fri, 18 Jul 2008 12:48:01 -0700, Aging Hippie