Changing date format in header and footer

S

Sonja

Hello,

I am using Office97 with Win98SE and quite happy with it!

How do I change the date format in a header or footer? It uses a default
which is OK in some cases but not in others? For example, the default is
dd-mm-yyyy (i.e. 22-07-2003) but from time to time I want to change this
to dd mmm yyyy (i.e. 22 Jul 2003) or something else.

Thanks,
-GHB
 
P

Paul Simon

Hi Sonja,

I think you're going to have to use a macro. Here's a sample of some
1-line codes (obviously, you would only use one of them).

ActiveSheet.PageSetup.CenterFooter = Format(Date, "Long Date")

ActiveSheet.PageSetup.CenterFooter = Format(Date, "Short Date")

ActiveSheet.PageSetup.CenterFooter = Format(Date, "General Date")

ActiveSheet.PageSetup.CenterFooter = Format(Date, "mm/d/yy")

ActiveSheet.PageSetup.CenterFooter = Format(Date, "dd mmm yyyy")

(Change "CenterFooter" in the above to LeftFooter or RightFooter as
you see fit.)

I hope this has been helpful to you.
Paul
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top