Date format in Header

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi!
Is is possible to have a customized format of Date (say, DD MM YY) for
Header/ Footer in Excel

Thanx
 
with vba

ActiveSheet.PageSetup.LeftHeader = Format(Date, "dd mm yy")


--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)
 
highlight header/footer
format cells custom
and type in reference
dd mm yy
click ok
==============
 
Thanx Venkataraman
Could you please elaborate on this 'highlight Header/ Footer'
My purpose is to have 'system date' automatically updated in the header
(with the said format)

Regards
--
Dr. Sachin Wagh
MBBS, DHA, DPH


R.VENKATARAMAN said:
highlight header/footer
format cells custom
and type in reference
dd mm yy
click ok
==============
 
File>page setup>header/footer or view>header and footer, select custom,
select the date icon

--
Regards,

Peo Sjoblom

(No private emails please)


Dr. Sachin Wagh said:
Thanx Venkataraman
Could you please elaborate on this 'highlight Header/ Footer'
My purpose is to have 'system date' automatically updated in the header
(with the said format)

Regards
 
Probably the question is not understood properly. I need the System Date in
the header in DD MM YY format, which should be updated automatically
 
Not understood because it was not stated as such.

Private Sub Workbook_BeforePrint(Cancel As Boolean)
ActiveSheet.PageSetup.LeftHeader = Format(Date, "dd mm yy")
End Sub

'This is workbook event code.
'To input this code, right click on the Excel icon on the worksheet
'(or next to the File menu if you maximise your workbooks),
'select View Code from the menu, and paste the code



--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)
 
Thanx a ton Bob!
I was responding to Venkataraman in my earlier reply

Your suggestion did the trick!
 
Back
Top