Header

  • Thread starter Thread starter Guest
  • Start date Start date
Mark. try this code

Private Sub Workbook_BeforePrint(Cancel As Boolean)
'will print the header on 1st page only
'Original code by Ron de Bruin

Totpage = Application.ExecuteExcel4Macro("GET.DOCUMENT(50)")
With ActiveSheet.PageSetup
.CenterHeader = "Put your header here"
ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1
.CenterHeader = ""
ActiveWindow.SelectedSheets.PrintOut From:=2, To:=Totpage
End With
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 & 2003
** 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