Excel Heading

  • Thread starter Thread starter Bill
  • Start date Start date
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?
 
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)
 
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
 
Back
Top