LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #13   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 191
Default Suppress First Page Header

Excellent Jim!! Thank you so much it is working beautifully.
--
Jamie


"Jim Cone" wrote:

Jamie,

Ok, some sheets have one page and others have 2 or more.
This code mod always leaves page 1 with an empty header.
If there is only one page to print, that is all you get.
Also, check out the supplemental sub at the bottom.
Regards,
Jim Cone
San Francisco, USA

"-----------------------------------
Sub PrintTest()
On Error GoTo PrintError
Application.EnableEvents = False
Dim TotPages As Long

TotPages = Application.ExecuteExcel4Macro("GET.DOCUMENT(50)")
If TotPages 1 Then
With ActiveSheet.PageSetup
.LeftHeader = ""
ActiveSheet.PrintOut From:=1, To:=1
.LeftHeader = "Unit Intake Report (continued)"
ActiveSheet.PrintOut From:=2, To:=TotPages
End With
Else
ActiveSheet.PageSetup.LeftHeader = ""
ActiveSheet.PrintOut
End If
PrintError:
Application.EnableEvents = True
End Sub
'-----------------------

'If, for some reason, the code gets interrupted
'and doesn't run to the end, then run this...

Sub ReturnToNormal()
Application.EnableEvents = True
End Sub




"Jamie" wrote in message
...
Oh Jim I spoke to soon. My workbook contains 12 sheets, one for each month.
For the January sheet I added info so I could get a second page to print,
however, for February's sheet I left it as is ( 1 sheet long), but the coding
forces a second page to print. The first page does not have a header, second
page does.

I'm thinking I need to have the coding check to see if there is a page break
within the sheet, if so activate the LeftHeader coding, if not ignore the
LeftHeader coding.

Does that make sense?
--
Jamie



 
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
Suppress First Page Numbering Michael Excel Worksheet Functions 4 April 27th 10 08:43 PM
How do I suppress the Header/Footer? Angelhearts Excel Discussion (Misc queries) 4 November 17th 09 05:54 PM
How do you suppress the page number on page one? SUPPRESSING PAGE NUMBERS IN EXCEL Excel Discussion (Misc queries) 4 May 13th 09 01:19 PM
How do I suppress a header of footer on the first page of a docume SLF Setting up and Configuration of Excel 0 January 24th 06 06:10 PM
Suppress First Page Header Jamie Excel Worksheet Functions 7 May 13th 05 05:48 PM


All times are GMT +1. The time now is 12:58 AM.

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

About Us

"It's about Microsoft Excel"