Excel Heading

B

Bill

Is there a way to include the value of a cell on a
worksheet in the custom heading (under Page Setup) for
that worksheet?
 
B

Bob Phillips

Bill,

Only with VBA

With Activesheet
.PageSetup.LeftHeader = .Range("A1")
End With

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
F

Frank Kabel

Hi
try the following code (put it in your workbook module):

Private Sub Workbook_BeforePrint(Cancel As Boolean)
Dim wkSht As Worksheet
For Each wkSht In me.worksheets
With wkSht.PageSetup
.CenterHeader = meRange("A1").value
End With
Next wkSht
End Sub

inserts the value of cell A1 in each worksheet
 
Top