Header

P

Paul B

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 **
 
Top