Can you reference cell values in Headers and Footers in Excel 200.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I want to customize my Header on an Excel spreadsheet to include the value
conatined in certain cells on my worksheet such that I will not have to
change the header every time I change the value of the referenced cell. Does
anyone know how to do this?
 
Hi
only possible with VBA using an event procedure. e.g. put the following
code
in your workbook module for cell A1
Private Sub Workbook_BeforePrint(Cancel As Boolean)
Dim wkSht As Worksheet
For Each wkSht In Me.Worksheets
With wkSht.PageSetup
.CenterFooter = wksht.range("A1").value
End With
Next wkSht
End Sub
 
Thanks

Frank Kabel said:
Hi
only possible with VBA using an event procedure. e.g. put the following
code
in your workbook module for cell A1
Private Sub Workbook_BeforePrint(Cancel As Boolean)
Dim wkSht As Worksheet
For Each wkSht In Me.Worksheets
With wkSht.PageSetup
.CenterFooter = wksht.range("A1").value
End With
Next wkSht
End Sub
 

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