Bookmark and Share

Enter your email address:

Delivered by FeedBurner



Home Page













Subscribe here
Add to My Yahoo!
This page is powered by Blogger. Isn't yours?

Host your Web site with PureHost!


eXTReMe Tracker
  Web http://www.klippert.com



  Sunday, June 29, 2008 – Permalink –

Customize Date in Footer

Formatting



This subroutine inserts the current date in the footer of all sheets in the active workbook. This process can be accomplished without a macro, however, you'll need the macro if you want to specify the formatting of the current date. An example of the return generated by running this macro is Saturday, March 05, 2005.

Sub PutCurrentDateInCenterFooterAllSheetsInWorkbook()
For Each oSheet In ActiveWorkbook.Sheets
oSheet.PageSetup.CenterFooter = Format(Now(), "dddd mmmm dd, yyyy")
Next
End Sub


You can change the word CenterFooter to CenterHeader. You could also use LeftHeader, RightHeader, LeftFooter, or RightFooter.

Microsoft KnowledgeBase:
Macro to Change the Date/Time Format in a Header/Footer

[Edited entry from 3/5/2005]




See all Topics

Labels:


<Doug Klippert@ 3:10 AM

Comments: Post a Comment

Links to this post:

Create a Link