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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top