Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Val
 
Posts: n/a
Default How do I stop printing a header after the third page?

I have selected the row header to print for pages one and two but I don't
want it to print on subsequent pages. How do I make this happen?
  #2   Report Post  
Dave Peterson
 
Posts: n/a
Default

The bad news is that if you don't include the rows to repeat at top, then more
stuff can be printed on each page.


For instance, in my test data, I set it up to use rows 1:2 as rows to repeat at
top. I didn't add any manual page breaks.

Page 1 showed 1:2 and 3:52 (52 rows)
Page 2 showed 1:2 and 53:102 (still 52 rows)

I removed those rows to repeat at top and tried to print pages 3-???
But excel figures that without the header, more rows could be printed on page 2
(no need to reserve room for 1:2 header rows).

So I saw page 3 printed 105:156 (still 52 rows)
and page 4 printed 157:208 (still 52 rows).

=========
But if I did the same kind of thing, but had manual page breaks for at least the
first 2 pages, it worked ok. But I made sure that page one and two were smaller
than 52 lines per page.

(And all of this really depends on the rowheight of rows 1 & 2.)

So if you want to play around with your page breaks, you may be able to use:

Option Explicit
Sub testme()
With ActiveSheet
.PageSetup.PrintTitleRows = "$1:$2"
.PrintOut preview:=True, from:=1, to:=2
.PageSetup.PrintTitleRows = ""
.PrintOut preview:=True, from:=3, to:=999
End With
End Sub

(I used preview:=true to save some trees when I was testing.)

======
Another workaround would be to format the header rows so that they don't show
anything. If you've only use a General numberformat, you could something like:

Option Explicit
Sub testme()
With ActiveSheet
.PageSetup.PrintTitleRows = "$1:$2"
.PrintOut preview:=True, from:=1, to:=2
.Rows("1:2").NumberFormat = ";;;"
.PrintOut preview:=True, from:=3, to:=999
.Rows("1:2").NumberFormat = "General"
End With
End Sub

(This does make it look like there's more of a header, though.)

If you have different formats, you can keep track of them and put 'em back the
way they were.



Val wrote:

I have selected the row header to print for pages one and two but I don't
want it to print on subsequent pages. How do I make this happen?


--

Dave Peterson
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
Why does the Sort function stop recognizing Header Rows? Frostfire Excel Worksheet Functions 4 July 18th 05 12:43 AM
Header - stop repeating on every page! sararose27 Excel Discussion (Misc queries) 2 February 17th 05 11:41 PM
Printing Custom Header lfalgi Excel Discussion (Misc queries) 1 January 26th 05 01:16 AM
Printing the page properties as header r_najafi Excel Discussion (Misc queries) 1 January 6th 05 03:59 PM
In Exel 2000, stop the blank cells (with formulas) from printing. tonyoc Excel Discussion (Misc queries) 1 December 10th 04 01:38 AM


All times are GMT +1. The time now is 01:25 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"