Header Formating

K

KW_Counter

I have a macro that puts data from a cell into the header.
Now I need to format the header.
I have tried using the formatting codess but I cant get them to work.
Here is the code, where does the formatting go?

With ActiveSheet
.PageSetup.CenterHeader = .Range("A1").Value
End With

Thanks for the help,
KW_Counter
 
G

Gord Dibben

Example only....adapt to suit.

Sub CellInFooter22()
With ActiveSheet.PageSetup
.CenterHeader = "&""Algerian,Regular""&12" & Range("A1")
End With
End Sub


Gord Dibben MS Excel MVP
 
J

Jim Cone

This makes the header text bold and italic...

Dim strTitle As String
strTitle = ActiveSheet.Range("A1").Value
ActiveSheet.PageSetup.CenterHeader = "&B&I" & strTitle
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware


"KW_Counter"
<[email protected]>
wrote in message
I have a macro that puts data from a cell into the header.
Now I need to format the header.
I have tried using the formatting codess but I cant get them to work.
Here is the code, where does the formatting go?
With ActiveSheet
.PageSetup.CenterHeader = .Range("A1").Value
End With
Thanks for the help,
KW_Counter
 
B

Bob Phillips

What formatting do you want to apply?

--

HTH

Bob Phillips

(replace xxxx in the email address with gmail if mailing direct)
 

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