View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jim Cone Jim Cone is offline
external usenet poster
 
Posts: 3,290
Default Suppress First Page Header

Jamie,

I just ran your exact code on a protected sheet with two pages.
Ran and printed without a problem - with header printed on
the second page only. (XL2002)

Regards,
Jim Cone
San Francisco, USA


"Jamie" wrote in message
...
I'm working in Excel 2002.
I would like to have a header appear on the second page and the pages that
follow.
The text that I want printed in the header beginning on page 2 is Unit
Intake Report (continued).
I have tried using the following coding with no success:
Sub Test()
Dim TotPages As Long
TotPages = Application.ExecuteExcel4Macro("GET.DOCUMENT(50)")
With ActiveSheet.PageSetup
.LeftHeader = ""
ActiveSheet.PrintOut From:=1, To:=1
.LeftHeader = "Unit Intake Report (continued)"
ActiveSheet.PrintOut From:=2, To:=TotPages
End With
End Sub
My document is protected. I've used the above coding sandwiched between:
ActiveSheet.Unprotect
ActiveSheet.Protect
This still does not produce a header. Can I suppress the first page header
within a protected document?
Thanks
Jamie