mine from "dd/mm/yyy" to "d mmm yyy" and I noticed that the excel
footer changed from 04/09/09 to 4 09 09. with "dd m yyy" excel showed
04 9 09. So it seems that excel recognises when there is an "/" in
the date format and it recognises the difference between m & mm but it
does not know how to do mmm or yyy. Strange. But it may not matter
anyway as the sheet would take on the short date format setting from
the PC of whoever you send the spreadsheet to anyway.
Sorry thats not a proper answer. There may be one out there but I'm
afraid that's my penny's worth.
The following code puts the current date into the left Footer:
Private Sub Workbook_BeforePrint(Cancel As Boolean)
ActiveSheet.PageSetup.LeftFooter = Format(Date, "d-mmm-dd")
End Sub
or "dd-mmm-dd"
1. To add this code to your file, press Alt+F11,
2. In the VBAProject window, top left side, find thisWorkbook under your
file name and double click it.
3. Paste in or type the code above.
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.