If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
End of Month Date in Header
I would like the last date of the current month to appear in the worksheet
header. Can eomonth be used in a macro? |
#2
|
|||
|
|||
End of Month Date in Header
You could, but you could use a simpler formula:
Dim myDate As Date myDate = Date - Day(Date) With Worksheets("Sheet1").PageSetup .LeftHeader = Format(myDate, "mmmm dd, yyyy dddd") End With Subtracting 18 from May 18th, gives May the 0th. Or the last day of April. CarrieW wrote: I would like the last date of the current month to appear in the worksheet header. Can eomonth be used in a macro? -- Dave Peterson |
Thread Tools | |
Display Modes | |
|
|