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
 

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

Similar Threads

Font in Header - @22 "25 Miles" goes to 409 font 1
Clear Format problem 2
Header Font size 3
Conditional Formating: MAX & MIN 3
Header Formating 3
reference a cell within the header 8
Text Formating 2
Header 2

Back
Top