Date command in Excel headers
You mean a header as in Footers and Headers for print setup?
Sub YearInFooter()
ActiveSheet.PageSetup.RightFooter = Year(Now)
End Sub
For all sheets in workbook.
Sub Date_All_Sheets()
Set wkbktodo = ActiveWorkbook
For Each WS In wkbktodo.Worksheets
WS.PageSetup.RightFooter = Year(Now)
Next
End Sub
Gord Dibben MS Excel MVP
On Thu, 28 Jan 2010 13:31:01 -0800, Doug
wrote:
How do I enter a date command in a header that displays only the current year
and not the complete date?
|