Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to create Specific date in macro code
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Create/modify date for specific sheets? | Excel Discussion (Misc queries) | |||
Create a new worksheet with a macro and giving it a specific name | Excel Discussion (Misc queries) | |||
Change a specific code to generic in VB macro | Excel Discussion (Misc queries) | |||
Create a formula in a date range to locate a specific date - ecel | Excel Discussion (Misc queries) | |||
code a macro to go to a specific website | Excel Programming |