formatting headers

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
 
V

Vasant Nanavati

Hi:

Try:

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

Regards,

Vasant.
 
T

Tom Ogilvy

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
 

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