Custom Header = Cell Contents...

W

Wayne

Using Excel 97

Is it possible to have a custom header (Page Set
up>Header Footer> Custom Header) reference the contents
of a cell?

I've tried" =Sheet1!A1" etc but this just prints
=Sheet1!A1"

Any ideas???
 
B

Bob Umlas

Right-click the Excel LOGO near the file menu, select View Code, enter this:

Private Sub Workbook_BeforePrint(Cancel As Boolean)
Activesheet.Pagesetup.LeftHeader = Sheets("Sheet1").Range("A1").Value
End Sub
 
Top