view cell content in header

  • Thread starter Thread starter John in Surrey
  • Start date Start date
You need some VBA code to do this:

You can use the workbook_beforeprint event to modify the header.

Option Explicit
Private Sub Workbook_BeforePrint(Cancel As Boolean)
With Me.Worksheets("sheet1")
.PageSetup.LeftHeader = .Range("a1").Text
End With
End Sub

This goes behind the ThisWorkbook module.

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm
 
Back
Top