LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default VBA format date in footer

Want to format the date in the footer. Would like ddd-mmm-dd, yyyy.
Date needs to stay current, can't be static, so the function below is
the what I am using now, but I need to format the date portion.

I recall this needs double sets of double quotes but can't quite get
it right.

Function PutFileNameInFooter(sh As Worksheet)
With sh.PageSetup
.RightHeader = "&9SheetName &A"
.LeftFooter = "&8&Z&F" & Chr(10) & "Printed: " & "&D &T"
.RightFooter = "" & Chr(10) & "&8Page &P of &N"
End With
End Function

want
.LeftFooter = "&8&Z&F" & Chr(10) & "Printed: " & "&format(D,"ddd-mmm-
dd, yyyy") &T"
such that is would be Mon Jun 05, 2007

 
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
Footer date format Rita Brasher[_2_] Excel Discussion (Misc queries) 2 April 14th 10 11:12 PM
Custom footer date format Trekman03 Excel Discussion (Misc queries) 2 September 4th 09 07:30 PM
Header/Footer Date Format David Excel Worksheet Functions 2 March 12th 09 08:50 AM
Footer date format Imran Excel Discussion (Misc queries) 1 October 4th 05 01:18 PM
How do I format the date in a footer? RBono Excel Discussion (Misc queries) 1 February 10th 05 01:01 AM


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

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

About Us

"It's about Microsoft Excel"