Date command in Excel headers
Yes, I mean a header as in Footers and Headers for print setup. Ok, so where
do I put this macro to make it work. Also, if I want the date to appear as a
left header instead of a right footer do I simply change "RightFooter" to
"LeftHeader"?
Thanks!
"Gord Dibben" wrote:
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?
.
|