Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default 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   Report Post  
Posted to microsoft.public.excel.programming
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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Create/modify date for specific sheets? Steve Vincent Excel Discussion (Misc queries) 3 September 17th 09 08:25 PM
Create a new worksheet with a macro and giving it a specific name Steve Krieger Excel Discussion (Misc queries) 2 May 27th 09 10:18 PM
Change a specific code to generic in VB macro Sue Excel Discussion (Misc queries) 2 April 23rd 08 06:56 PM
Create a formula in a date range to locate a specific date - ecel util Excel Discussion (Misc queries) 0 February 19th 07 03:03 PM
code a macro to go to a specific website Rhonda[_2_] Excel Programming 6 September 24th 03 02:16 PM


All times are GMT +1. The time now is 08:08 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"