Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / General Excel Questions / November 2003

Tip: Looking for answers? Try searching our database.

Header Date

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Carol - 05 Nov 2003 17:03 GMT
I selected the calendar icon to customize the header on a
worksheet.  However, the date that shows on my worksheet
is incorrect even though the calendar is correct.  It is
November 5, 2003, and the date is showing 05/11/2003 on my
document.  If I change the date on the calendar to be May
5, 2003, then it shows 11-5-2003!  It transposes it!  Is
there a way to reformat the way a date is displayed in a
header?  I haven't found one.  Everything I've found is
for the default settings for dates in the cells.

Thank you.
Gord Dibben - 05 Nov 2003 19:00 GMT
Carol

First, I assume you meant May 11, 2003 not May 5, 2003.

>If I change the date on the calendar to be May 5, 2003, then it shows 11-5-2003!

Second, the default short date format is set in Windows, not in Excel.

Start>Settings>Control Panel>Regional Settings(or Language
options)>Customize>Date

Gord Dibben   XL2002

>I selected the calendar icon to customize the header on a
>worksheet.  However, the date that shows on my worksheet
[quoted text clipped - 7 lines]
>
>Thank you.
Peter Crossing - 06 Nov 2003 00:21 GMT
I have the short date set in Windows to '6/Nov/2003'. MS-Access query
headers print '6/Nov/2003' correctly, Excel ('97 and 2003) headers do
not: they print '6/11/2003' regardless of the Windows (XP) setting.
Any clues appreciated!

Peter Crossing

> Second, the default short date format is set in Windows, not in Excel.
>
> Start>Settings>Control Panel>Regional Settings(or Language
> options)>Customize>Date
>
> Gord Dibben   XL2002
Dave Peterson - 06 Nov 2003 01:39 GMT
It sure looks like you'll need a macro.

Right click on the Excel Icon to the left of the worksheet menubar
(File|edit|View...) and select view code:

Paste this in:

Option Explicit

Private Sub Workbook_BeforePrint(Cancel As Boolean)
   With Worksheets("sheet1").PageSetup
       .LeftHeader = Format(Date, "d/mmm/yyyy")
   End With
End Sub

Adjust the worksheet name & header section accordingly.

> I have the short date set in Windows to '6/Nov/2003'. MS-Access query
> headers print '6/Nov/2003' correctly, Excel ('97 and 2003) headers do
[quoted text clipped - 9 lines]
> >
> > Gord Dibben   XL2002

Signature

Dave Peterson
ec35720@msn.com

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2010 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.