View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default How to create Specific date in macro code

Eric,

Put this code min the ThisWorkbook code module


Private Sub Workbook_BeforePrint(Cancel As Boolean)
With ActiveSheet
.PageSetup.LeftHeader = Format(Date, "dddd, mmm dd, yyyy")
End With
End Sub


--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Eric" wrote in message
...
Hi,

I am creating a macro code that generate reports every
Wednesday and Friday of the week. Every time I send the
reports to our head office I always change my heading
manually to something like this: "Wednesday, Dec 17,
2003" and "Friday, Dec 19, 2003". I want my code when I
printed reports to generate for me this heading
automatically without typing it manually. Is this possible?

I would appreciate very much your suggestions and tips how
to do this.

TIA
Eric