Header Formating

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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
 
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
 
What formatting do you want to apply?

--

HTH

Bob Phillips

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