formatting headers

  • Thread starter Thread starter need-A-hand
  • Start date Start date
N

need-A-hand

Hello,
I wonder if you can help me

I know how to format a string within a header

eg:
sheet1.pagesetup.centerheader="&""ariel,bold"&""&14HELLO"
formats the word HELLO to bold and size 14

However, instead of HELLO, I need to put in a variable
which represents a date.
If anyone can help I'd be very grateful

Many thanks
Geoff
 
Hi:

Try:

Sheet1.PageSetup.CenterHeader = "&""Arial""&14&B" & _
Format(Date, "d-mmm-yyyy")

Regards,

Vasant.
 
This puts in a date with the format you specify, but it should be run before
each print:

With ActiveSheet.PageSetup
.LeftFooter = "&""Arial,Bold""&14" & Format(Date, "mmm dd, yyyy")
End With


this uses the special date character so the date it updated automatically
with the short date format:

With ActiveSheet.PageSetup
.LeftHeader = "&""Arial,Bold""&14&D"
End With
 
Back
Top