View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
CLR
 
Posts: n/a
Default How do I set a date formula in the page setup header to add 10

Agreed Dave.......thanks for making the point.

Vaya con Dios,
Chuck, CABGx3



"Dave Peterson" wrote:

I think I'd use:

Sub DatePlus10ToHeader()
With ActiveSheet.PageSetup
.LeftHeader = format(date+10,"mm/dd/yyyy")
End With
End Sub

When you concatenated the string, day(date)+10 might not be the day you want.

CLR wrote:

This macro should do it.........

Sub DatePlus10ToHeader()
With ActiveSheet.PageSetup
.LeftHeader = Month(Date) & "/" & Day(Date) + 10 & "/" & Year(Date)
End With
End Sub

Vaya con Dios,
Chuck, CABGx3

"phil@work" wrote:

Need to display todays date plus 10 in the page setup header.


--

Dave Peterson