MrExcel Publishing
Your One Stop for Excel Tips & Solutions

cell references in headers

Posted by Leonard Erlandson on September 19, 2001 6:04 AM

Is there any way to reference a cell in the header of the document? I'm making an estimating spreadsheet where the job name is put in on the first page and I want it to show up as the header on all of the pages.

Posted by lenze on September 19, 2001 6:46 AM

Code similar to this will work

Private Sub Workbook_BeforePrint(Cancel As Boolean)
With ActiveSheet.PageSetup
.LeftHeader = Sheets("Sheet1").Range("$A$6")
End With
End Sub

Place this in the ThisWorkBook Module