Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc,microsoft.public.excel.printing,microsoft.public.excel.programming
external usenet poster
 
Posts: 2
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  
Posted to microsoft.public.excel.misc,microsoft.public.excel.printing,microsoft.public.excel.programming
external usenet poster
 
Posts: 2,718
Default Printing rows in 1 block

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  
Posted to microsoft.public.excel.misc,microsoft.public.excel.printing,microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Printing rows in 1 block

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 Printing of sheet Shu of AZ Excel Discussion (Misc queries) 1 July 9th 08 09:46 AM
Printing rows in 1 block Sam Vanderstraeten Excel Discussion (Misc queries) 2 July 25th 05 02:53 PM
Block an area of sheet from Printing? lbbss Excel Discussion (Misc queries) 4 June 8th 05 07:21 PM
Block an area of sheet from Printing? lbbss Setting up and Configuration of Excel 4 June 8th 05 07:21 PM
select block of rows w/data between blank rows Janna Excel Programming 6 February 13th 05 02:45 AM


All times are GMT +1. The time now is 09:10 PM.

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"