How do I change the default date format in an Excel Footer

G

Guest

I need to change the date format in an Excel footer from e.g. 05.02.2005 to
05-Feb-2005. How can I do this?
 
D

Dave Peterson

You can either type in exactly what you want...

or you can use a macro that runs each time you print.

Option Explicit
Private Sub Workbook_BeforePrint(Cancel As Boolean)
With Worksheets("sheet1").PageSetup
.LeftFooter = Format(Date, "dd-mmm-yyyy")
End With
End Sub


This goes into the ThisWorkbook module.

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm
 

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