Date format in Header

G

Guest

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

R.VENKATARAMAN

highlight header/footer
format cells custom
and type in reference
dd mm yy
click ok
==============
 
G

Guest

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
 
G

Guest

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

Guest

Thanx a ton Bob!
I was responding to Venkataraman in my earlier reply

Your suggestion did the trick!
 

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

Top