Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Jamie
 
Posts: n/a
Default Suppress First Page Header

I'm working in Excel 2002.

How can I suppress a header on the first page, but have it print on the
pages that follow.

The text that I want printed in the header beginning on page 2 is Unit
Intake Report (continued)

Thanks
--
Jamie
  #2   Report Post  
Ron de Bruin
 
Posts: n/a
Default

Hi Jamie

If you print with a macro it is possible
See http://www.rondebruin.nl/print.htm#Header

--
Regards Ron de Bruin
http://www.rondebruin.nl



"Jamie" wrote in message ...
I'm working in Excel 2002.

How can I suppress a header on the first page, but have it print on the
pages that follow.

The text that I want printed in the header beginning on page 2 is Unit
Intake Report (continued)

Thanks
--
Jamie



  #3   Report Post  
Jamie
 
Posts: n/a
Default

Hi Ron, I have tried this macro, but my header does not appear on the second
page. I changed the coding to this:

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

Do I need to include:

.CenterFooter = "&8Page &P & of &N"
.RightFooter = "&8Last Saved : &B" &
ActiveWorkbook.BuiltinDocumentProperties("Last Save Time")
.LeftFooter = "&8" & ActiveWorkbook.FullName & Chr(10) & "Sheetname
: &B" & ActiveSheet.Name

Thanks
--
Jamie


"Ron de Bruin" wrote:

Hi Jamie

If you print with a macro it is possible
See http://www.rondebruin.nl/print.htm#Header

--
Regards Ron de Bruin
http://www.rondebruin.nl



"Jamie" wrote in message ...
I'm working in Excel 2002.

How can I suppress a header on the first page, but have it print on the
pages that follow.

The text that I want printed in the header beginning on page 2 is Unit
Intake Report (continued)

Thanks
--
Jamie




  #4   Report Post  
Ron de Bruin
 
Posts: n/a
Default

Hi Jamie

I have no problem when I run it ?
Test it on a new workbook

Do I need to include:

No, just examples


--
Regards Ron de Bruin
http://www.rondebruin.nl



"Jamie" wrote in message ...
Hi Ron, I have tried this macro, but my header does not appear on the second
page. I changed the coding to this:

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

Do I need to include:

.CenterFooter = "&8Page &P & of &N"
.RightFooter = "&8Last Saved : &B" &
ActiveWorkbook.BuiltinDocumentProperties("Last Save Time")
.LeftFooter = "&8" & ActiveWorkbook.FullName & Chr(10) & "Sheetname
: &B" & ActiveSheet.Name

Thanks
--
Jamie


"Ron de Bruin" wrote:

Hi Jamie

If you print with a macro it is possible
See http://www.rondebruin.nl/print.htm#Header

--
Regards Ron de Bruin
http://www.rondebruin.nl



"Jamie" wrote in message ...
I'm working in Excel 2002.

How can I suppress a header on the first page, but have it print on the
pages that follow.

The text that I want printed in the header beginning on page 2 is Unit
Intake Report (continued)

Thanks
--
Jamie






  #5   Report Post  
Jamie
 
Posts: n/a
Default

Hi Ron, I'm sorry I forgot to mention that the document is protected, would
that prevent the macro from working.
--
Jamie


"Ron de Bruin" wrote:

Hi Jamie

I have no problem when I run it ?
Test it on a new workbook

Do I need to include:

No, just examples


--
Regards Ron de Bruin
http://www.rondebruin.nl



"Jamie" wrote in message ...
Hi Ron, I have tried this macro, but my header does not appear on the second
page. I changed the coding to this:

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

Do I need to include:

.CenterFooter = "&8Page &P & of &N"
.RightFooter = "&8Last Saved : &B" &
ActiveWorkbook.BuiltinDocumentProperties("Last Save Time")
.LeftFooter = "&8" & ActiveWorkbook.FullName & Chr(10) & "Sheetname
: &B" & ActiveSheet.Name

Thanks
--
Jamie


"Ron de Bruin" wrote:

Hi Jamie

If you print with a macro it is possible
See http://www.rondebruin.nl/print.htm#Header

--
Regards Ron de Bruin
http://www.rondebruin.nl



"Jamie" wrote in message ...
I'm working in Excel 2002.

How can I suppress a header on the first page, but have it print on the
pages that follow.

The text that I want printed in the header beginning on page 2 is Unit
Intake Report (continued)

Thanks
--
Jamie








  #6   Report Post  
Ron de Bruin
 
Posts: n/a
Default

Hi Jamie

I read in your other thread that you got it working
Sorry I don't tell you that this macro also print ( you not use the print button of excel)

--
Regards Ron de Bruin
http://www.rondebruin.nl



"Jamie" wrote in message ...
Hi Ron, I'm sorry I forgot to mention that the document is protected, would
that prevent the macro from working.
--
Jamie


"Ron de Bruin" wrote:

Hi Jamie

I have no problem when I run it ?
Test it on a new workbook

Do I need to include:

No, just examples


--
Regards Ron de Bruin
http://www.rondebruin.nl



"Jamie" wrote in message ...
Hi Ron, I have tried this macro, but my header does not appear on the second
page. I changed the coding to this:

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

Do I need to include:

.CenterFooter = "&8Page &P & of &N"
.RightFooter = "&8Last Saved : &B" &
ActiveWorkbook.BuiltinDocumentProperties("Last Save Time")
.LeftFooter = "&8" & ActiveWorkbook.FullName & Chr(10) & "Sheetname
: &B" & ActiveSheet.Name

Thanks
--
Jamie


"Ron de Bruin" wrote:

Hi Jamie

If you print with a macro it is possible
See http://www.rondebruin.nl/print.htm#Header

--
Regards Ron de Bruin
http://www.rondebruin.nl



"Jamie" wrote in message ...
I'm working in Excel 2002.

How can I suppress a header on the first page, but have it print on the
pages that follow.

The text that I want printed in the header beginning on page 2 is Unit
Intake Report (continued)

Thanks
--
Jamie








  #7   Report Post  
Jamie
 
Posts: n/a
Default

Hi Ron, thanks for your solution. I have another question. Can I add coding
to the macro so the user can either use the print button or File, Print. I'd
like to avoid creating a print button on the worksheet.
--
Jamie


"Ron de Bruin" wrote:

Hi Jamie

I read in your other thread that you got it working
Sorry I don't tell you that this macro also print ( you not use the print button of excel)

--
Regards Ron de Bruin
http://www.rondebruin.nl



"Jamie" wrote in message ...
Hi Ron, I'm sorry I forgot to mention that the document is protected, would
that prevent the macro from working.
--
Jamie


"Ron de Bruin" wrote:

Hi Jamie

I have no problem when I run it ?
Test it on a new workbook

Do I need to include:
No, just examples


--
Regards Ron de Bruin
http://www.rondebruin.nl



"Jamie" wrote in message ...
Hi Ron, I have tried this macro, but my header does not appear on the second
page. I changed the coding to this:

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

Do I need to include:

.CenterFooter = "&8Page &P & of &N"
.RightFooter = "&8Last Saved : &B" &
ActiveWorkbook.BuiltinDocumentProperties("Last Save Time")
.LeftFooter = "&8" & ActiveWorkbook.FullName & Chr(10) & "Sheetname
: &B" & ActiveSheet.Name

Thanks
--
Jamie


"Ron de Bruin" wrote:

Hi Jamie

If you print with a macro it is possible
See http://www.rondebruin.nl/print.htm#Header

--
Regards Ron de Bruin
http://www.rondebruin.nl



"Jamie" wrote in message ...
I'm working in Excel 2002.

How can I suppress a header on the first page, but have it print on the
pages that follow.

The text that I want printed in the header beginning on page 2 is Unit
Intake Report (continued)

Thanks
--
Jamie









  #8   Report Post  
Ron de Bruin
 
Posts: n/a
Default

Hi Jamie

You can use the beforeprint event to do this in the thisworkbook module
If you press the print button your code will run (I use a sheet named "Sheet1" in the example)

See this page for more info about events
http://www.cpearson.com/excel/events.htm


Private Sub Workbook_BeforePrint(Cancel As Boolean)
Dim TotPages As Long
If ActiveSheet.Name = "Sheet1" Then
Cancel = True
Application.EnableEvents = False
Application.ScreenUpdating = False
TotPages = Application.ExecuteExcel4Macro("GET.DOCUMENT(50)")
With ActiveSheet.PageSetup
.RightHeader = "Your Header info"
ActiveSheet.PrintOut From:=1, To:=1
.RightHeader = ""
ActiveSheet.PrintOut From:=2, To:=TotPages
End With
Application.EnableEvents = True
Application.ScreenUpdating = True
End If
End Sub



--
Regards Ron de Bruin
http://www.rondebruin.nl



"Jamie" wrote in message ...
Hi Ron, thanks for your solution. I have another question. Can I add coding
to the macro so the user can either use the print button or File, Print. I'd
like to avoid creating a print button on the worksheet.
--
Jamie


"Ron de Bruin" wrote:

Hi Jamie

I read in your other thread that you got it working
Sorry I don't tell you that this macro also print ( you not use the print button of excel)

--
Regards Ron de Bruin
http://www.rondebruin.nl



"Jamie" wrote in message ...
Hi Ron, I'm sorry I forgot to mention that the document is protected, would
that prevent the macro from working.
--
Jamie


"Ron de Bruin" wrote:

Hi Jamie

I have no problem when I run it ?
Test it on a new workbook

Do I need to include:
No, just examples


--
Regards Ron de Bruin
http://www.rondebruin.nl



"Jamie" wrote in message ...
Hi Ron, I have tried this macro, but my header does not appear on the second
page. I changed the coding to this:

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

Do I need to include:

.CenterFooter = "&8Page &P & of &N"
.RightFooter = "&8Last Saved : &B" &
ActiveWorkbook.BuiltinDocumentProperties("Last Save Time")
.LeftFooter = "&8" & ActiveWorkbook.FullName & Chr(10) & "Sheetname
: &B" & ActiveSheet.Name

Thanks
--
Jamie


"Ron de Bruin" wrote:

Hi Jamie

If you print with a macro it is possible
See http://www.rondebruin.nl/print.htm#Header

--
Regards Ron de Bruin
http://www.rondebruin.nl



"Jamie" wrote in message ...
I'm working in Excel 2002.

How can I suppress a header on the first page, but have it print on the
pages that follow.

The text that I want printed in the header beginning on page 2 is Unit
Intake Report (continued)

Thanks
--
Jamie











Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
header and footer on every page except the first page? marany Excel Discussion (Misc queries) 1 April 18th 05 06:12 PM
adding a new page break to an existing page break Edward Letendre Excel Discussion (Misc queries) 1 March 6th 05 09:29 AM
changing page numbers in repeated header Jennifer Excel Discussion (Misc queries) 0 March 2nd 05 05:09 PM
How do I keep the header on the first page but hide it on the sec. victoria Excel Discussion (Misc queries) 1 February 3rd 05 12:22 AM
Default header in Excel under page set-up Melanie Excel Discussion (Misc queries) 2 December 15th 04 01:37 AM


All times are GMT +1. The time now is 01:37 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"