format the "date" button for a header
I need to insert a date in my header but not in the short format currently
provided by pressing the "date" button. Is there a forumala etc that I can use that will change the format of this particular date without going through computer settings and chaning the "standard" date option. (much like how you can format a normal cell to show the date in whatever format you require |
You can use this macro:
Public Sub DateInHeader() Dim ws As Worksheet For Each ws In ActiveWindow.SelectedSheets ws.PageSetup.LeftHeader = Format(Date, "dd mmm yyyy") Next ws End Sub Change the date format to suit. You can also use .CenterHeader or .RightHeader In article , "sc11" wrote: I need to insert a date in my header but not in the short format currently provided by pressing the "date" button. Is there a forumala etc that I can use that will change the format of this particular date without going through computer settings and chaning the "standard" date option. (much like how you can format a normal cell to show the date in whatever format you require |
All times are GMT +1. The time now is 09:24 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com