You're changing the header in the worksheet you just activated?
Private Sub Worksheet_Activate()
me.PageSetup.LeftHeader = me.range("B11").Value
End Sub
Me is the object that owns the code--in this case, the worksheet you just
activated.
If you're actually changing the header in a different worksheet:
Worksheets("Worksheet1").PageSetup.LeftHeader _
= worksheets("worksheet1").range("B11").Value
or to save some typing:
with Worksheets("Worksheet1")
.PageSetup.LeftHeader = .range("B11").Value
end with
Change that worksheet1 to the name you see on the tab in excel.
> Hi, I've been trying to use a cell reference in the header of my excel
> worksheets. The cell, B11, is in Worksheet1. I have the header
[quoted text clipped - 22 lines]
> the header?
> Thank you!

Signature
Dave Peterson
kaken6@gmail.com - 21 Mar 2007 17:05 GMT
> You're changing the header in the worksheet you just activated?
>
[quoted text clipped - 52 lines]
>
> - Show quoted text -
Thank you Dave,
Worksheets("Worksheet2").PageSetup.LeftHeader=
worksheets("Worksheet1").range("B11").Value
Works great.
Is there any way to italicize this reference?
Thanks again.
Gord Dibben - 21 Mar 2007 19:25 GMT
Sub test()
With Worksheets("Worksheet2").PageSetup
.LeftHeader = "&""Arial,Italic""&12" & _
Worksheets("Worksheet1").Range("B11").Value
End With
End Sub
Gord Dibben MS Excel MVP
>Worksheets("Worksheet2").PageSetup.LeftHeader=
>worksheets("Worksheet1").range("B11").Value
>Works great.
>Is there any way to italicize this reference?
>
>Thanks again.