Home |
Search |
Today's Posts |
#1
![]() |
|||
|
|||
![]()
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
![]() |
|||
|
|||
![]()
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
![]() |
|||
|
|||
![]()
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
![]() |
|||
|
|||
![]()
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
![]() |
|||
|
|||
![]()
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
![]() |
|||
|
|||
![]()
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
![]() |
|||
|
|||
![]()
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
![]() |
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
header and footer on every page except the first page? | Excel Discussion (Misc queries) | |||
adding a new page break to an existing page break | Excel Discussion (Misc queries) | |||
changing page numbers in repeated header | Excel Discussion (Misc queries) | |||
How do I keep the header on the first page but hide it on the sec. | Excel Discussion (Misc queries) | |||
Default header in Excel under page set-up | Excel Discussion (Misc queries) |