Tech Support Guy banner
Status
Not open for further replies.

excel date format

907 views 2 replies 3 participants last post by  XL Guru 
#1 ·
Can anyone tell me how to change the format of the date in a footer. I would like in to read "Jan-27-04"
 
#3 ·
I thought this was tied to Control Panel (Regional), but even then couldn't tweak it effectively.

You could use code in personal.xls, eg:

ActiveSheet.PageSetup.LeftFooter = Format(Now, "mmm-dd-yy")

, or you might want to store it in the workbook module. Rightclick the Excel icon left of "File" in the menu bar, choose "View Code". Then paste this in.

Private Sub WorkBook_BeforePrint(Cancel As Boolean)
ActiveSheet.PageSetup.LeftFooter = Format(Now, "mmm-dd-yy")
End Sub

BeforePrint is covered in VBA Help.

Rgds,
Andy
 
Status
Not open for further replies.
You have insufficient privileges to reply here.
Top