Header Help

  • Thread starter Thread starter Paul
  • Start date Start date
P

Paul

Using XL 2000

I need to take the content of cell A1 and place it in the
worksheet page header when printing.

Any ideas as to how this can be done programmatically?

TIA, Paul
 
Paul, put this in the thisworkbok code

Private Sub Workbook_BeforePrint(Cancel As Boolean)
ActiveSheet.PageSetup.RightHeader = Range("A1")
End Sub


--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2000 & 97
** remove news from my email address to reply by email **
 
Place this code in the workbook module

Private Sub Workbook_BeforePrint(Cancel As Boolean
Dim sht As Workshee
Set sht = ActiveShee
sht.PageSetup.CenterHeader = sht.Range("A1").Valu
End Su

HTH

-Brad Vontu
 
Perfect. Many thanks Paul
-----Original Message-----
Paul, put this in the thisworkbok code

Private Sub Workbook_BeforePrint(Cancel As Boolean)
ActiveSheet.PageSetup.RightHeader = Range("A1")
End Sub


--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2000 & 97
** remove news from my email address to reply by email **



.
 

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