Date format in Header

D

Dr. Sachin Wagh

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

Thanx
 
B

Bob Phillips

with vba

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


--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)
 
D

Dr. Sachin Wagh

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
==============
 
P

Peo Sjoblom

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
 
D

Dr. Sachin Wagh

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
 
B

Bob Phillips

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)
 
Top