Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Sam Vanderstraeten
 
Posts: n/a
Default Printing rows in 1 block

Hi,

I have an Excel-file with much worksheets (+/- 200). Every worksheet
contains some or much datarows (sometimes 2 rows, sometimes 5 pages of
rows).
At the bottom of every worksheet (not every page), I want to print a grid of
about 7 to 10 rows with some data in.
The porblem I have now is...
1. When I print a worksheet of 2 rows data + grid, everything fits on one
page = OK
2. When I print a page of f.e. 20 rows data + grid, the data and the first 3
lines of my grid are on page 1, the other 5 lines of the grid are printed on
a new page = NOK
The grid must be printed in 1 block. So, in example 2, I need a page with
the datarows and a new page with the grid.

I tried to insert a pagebreak BEFORE the grid, but in that case, in example
1 (where everything fits on one page), I also get 2 pages...

Any solutions to keep that grid printed in 1 block? I can work with VBA...

Thanks in advance!

Sam


  #2   Report Post  
Jim Rech
 
Posts: n/a
Default

There is no feature in Excel that automatically keeps a group of rows on the
same printed page. I think you're going to write a macro that intelligently
places manual page breaks so as to get the result you want. You have a set
of macro tools that can tell you where the breaks currently are. Maybe you
can make use of them somehow to set new breaks.

Sub aa()
Dim Brk As HPageBreak
MsgBox Application.ExecuteExcel4Macro("get.document(50)") _
& " total pages will print"
For Each Brk In ActiveSheet.HPageBreaks
MsgBox Brk.Location.Address & " - " & _
IIf(Brk.Type = xlPageBreakAutomatic, "Automatic", _
"Manual")
Next
End Sub


--
Jim
"Sam Vanderstraeten" wrote in message
...
| Hi,
|
| I have an Excel-file with much worksheets (+/- 200). Every worksheet
| contains some or much datarows (sometimes 2 rows, sometimes 5 pages of
| rows).
| At the bottom of every worksheet (not every page), I want to print a grid
of
| about 7 to 10 rows with some data in.
| The porblem I have now is...
| 1. When I print a worksheet of 2 rows data + grid, everything fits on one
| page = OK
| 2. When I print a page of f.e. 20 rows data + grid, the data and the first
3
| lines of my grid are on page 1, the other 5 lines of the grid are printed
on
| a new page = NOK
| The grid must be printed in 1 block. So, in example 2, I need a page with
| the datarows and a new page with the grid.
|
| I tried to insert a pagebreak BEFORE the grid, but in that case, in
example
| 1 (where everything fits on one page), I also get 2 pages...
|
| Any solutions to keep that grid printed in 1 block? I can work with VBA...
|
| Thanks in advance!
|
| Sam
|
|


  #3   Report Post  
Tom Ogilvy
 
Posts: n/a
Default

Using VBA code:

Just display pagebreaks. Then if an automatic pagebreak occurs in your grid
(loop through the cells an check), you would place a manual pagebreak above
it. If one does not, you would not.

--
Regards,
Tom Ogilvy

"Sam Vanderstraeten" wrote in message
...
Hi,

I have an Excel-file with much worksheets (+/- 200). Every worksheet
contains some or much datarows (sometimes 2 rows, sometimes 5 pages of
rows).
At the bottom of every worksheet (not every page), I want to print a grid

of
about 7 to 10 rows with some data in.
The porblem I have now is...
1. When I print a worksheet of 2 rows data + grid, everything fits on one
page = OK
2. When I print a page of f.e. 20 rows data + grid, the data and the first

3
lines of my grid are on page 1, the other 5 lines of the grid are printed

on
a new page = NOK
The grid must be printed in 1 block. So, in example 2, I need a page with
the datarows and a new page with the grid.

I tried to insert a pagebreak BEFORE the grid, but in that case, in

example
1 (where everything fits on one page), I also get 2 pages...

Any solutions to keep that grid printed in 1 block? I can work with VBA...

Thanks in advance!

Sam




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
Block an area of sheet from Printing? lbbss Excel Discussion (Misc queries) 4 June 8th 05 07:21 PM
Hiding rows before printing DaveM Excel Discussion (Misc queries) 3 April 16th 05 11:38 AM
Printing problems with columns and rows Ann Shaw Excel Discussion (Misc queries) 0 February 17th 05 05:35 PM
Printing only certain rows Jon W Excel Discussion (Misc queries) 1 February 9th 05 01:15 AM
Printing Frozen Rows Brandt Excel Discussion (Misc queries) 2 December 23rd 04 08:07 PM


All times are GMT +1. The time now is 11:16 PM.

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"