![]() |
How do I display the last updated date in the page header?
I need to display the date the workbook was last modified in the page header
when it's printed. |
How do I display the last updated date in the page header?
Hi,
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 = _ ActiveWorkbook.BuiltinDocumentProperties(12).Value End Sub Mike "Aging Hippie" wrote: I need to display the date the workbook was last modified in the page header when it's printed. |
How do I display the last updated date in the page header?
There is no "modified" property
Best you can get is last saved time. Sub printit() ActiveSheet.PageSetup.RightHeader = "&8Last Saved : " & _ Format(ThisWorkbook.BuiltinDocumentProperties("Las t Save Time"), _ "yyyy-mmm-dd hh:mm:ss") End Sub Gord Dibben MS Excel MVP On Fri, 18 Jul 2008 12:48:01 -0700, Aging Hippie wrote: I need to display the date the workbook was last modified in the page header when it's printed. |
All times are GMT +1. The time now is 10:39 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com