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
 

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

Top