#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Header code

Thanks Ron... but this still is not pulling in the format
of the source cell. For example. Cell B2 is Bold but the
header related to that cell is not.
-----Original Message-----
Hi Bdavis

With ActiveSheet.PageSetup
.LeftHeader = ""
.LeftHeader = ActiveSheet.Range("b2").Text & Chr

(10) & _
ActiveSheet.Range("b3").Text & Chr

(10) & _
ActiveSheet.Range("b4").Text
End With

More info you can find here
http://www.cpearson.com/excel/headfoot.htm



--
Regards Ron de Bruin
http://www.rondebruin.nl


"Bdavis" wrote in message

...
I am using the following macro to creat header/footers:

Sub Footer()
'
' Footer Macro
With ActiveSheet.PageSetup
.LeftHeader = ActiveSheet.Range("b2").Text & _
ActiveSheet.Range("b3").Text & _
ActiveSheet.Range("b4").Text
.CenterHeader = ""
.RightHeader = ""
.LeftFooter = "&""Times New
Roman,Bold""Confidential Draft"
.CenterFooter = "&""Times New Roman,Bold""&P of

&N"
.RightFooter = ""
End With
End Sub


As you can see, the left header is created by combining
three cells on the active sheet. What I'd like to do

(and
can't figure out) is to put carrage returns between

those
three lines and pull the formatting of the referenced
cells inot the header. I thought the above code would

do
that but it doesn't seem to work... the header remains
unformatted.

Thanks!



.


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Omit header from first page without embedding header in code ibvalentine Excel Worksheet Functions 6 August 28th 07 05:10 AM
Does anyone know the code to put a number in the right header... Jennifer-Houston, TX[_2_] Excel Discussion (Misc queries) 3 August 20th 07 03:22 PM
Does anyone know the code to put a number in the right header and. Jennifer-Houston, TX[_2_] Excel Discussion (Misc queries) 4 August 17th 07 02:12 AM
Header code Bdavis[_2_] Excel Programming 6 November 4th 04 05:07 AM
Code to put contents of A1 and B1 in header Sandy[_3_] Excel Programming 7 August 18th 03 01:07 PM


All times are GMT +1. The time now is 11:22 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"