Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Date Formats in Headers/Footers

How can the format of the current date be changed in an Excel Header or Footer when printing a document from Excel?
--
Paul M
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Date Formats in Headers/Footers

Hi

You can use the format function
Copy this event in the Thisworkbook module

Private Sub Workbook_BeforePrint(Cancel As Boolean)
Dim sht As Worksheet
For Each sht In ActiveWorkbook.Sheets
sht.PageSetup.LeftFooter = Format(Now, "dd-mm-yy")
Next sht
End Sub


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Twoo Doggs" wrote in message ...
How can the format of the current date be changed in an Excel Header or Footer when printing a document from Excel?
--
Paul M



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Date Formats in Headers/Footers

Use the beforeprint event to redefine the header . format the date as part
of a string that you build that will appear as you want. Then assign it to
the appropriate property of PageSetup.

--
Regards,
Tom Ogilvy


"Twoo Doggs" wrote in message
...
How can the format of the current date be changed in an Excel Header or

Footer when printing a document from Excel?
--
Paul M



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
Headers/footers daisy Excel Worksheet Functions 2 September 13th 07 03:54 PM
Headers/Footers daisy Excel Worksheet Functions 0 September 13th 07 03:22 PM
Headers and Footers stumac Excel Discussion (Misc queries) 0 February 15th 07 03:08 PM
Headers and Footers bo Excel Discussion (Misc queries) 1 September 29th 06 07:56 PM
headers and footers Tester Excel Discussion (Misc queries) 2 November 16th 05 12:58 AM


All times are GMT +1. The time now is 06:39 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"