Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default pages break in the 66rd line , 132, etc...

Hello,
(sorry for my poor english) :-))

I copy a lot of tables in one to resume (it works) ; all areas have the same
structure (from column A to K) but not the same numbers of rows; the grand
total varies from 200 to 500 lines; i would like, after the copy, to place
page break all the 66 lines (with a font 10, A4 paper) but if the ligne
66-132 etc.. is not free, the page break must be placed in a free
line..before like 65-64-63.

Thank you

Patrick


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default pages break in the 66rd line , 132, etc...

Something like this pseudo code. You might have to play with it a little to
get the pagebreaks exactly where you want them.


Lastrow = cells(rows.count,1).End(xlup).row
i = 66
do
j = i + 1
do
j = j -1
if Application.CountA(rows(j)) = 0 then _
Activesheet.HPageBreaks.Add Befo=rows(j + 1)
Loop while Application.CountA(rows(j)) < 0
i = j + 66
Loop while i < LastRow

--
Regards,
Tom Ogilvy



"...Patrick" wrote:

Hello,
(sorry for my poor english) :-))

I copy a lot of tables in one to resume (it works) ; all areas have the same
structure (from column A to K) but not the same numbers of rows; the grand
total varies from 200 to 500 lines; i would like, after the copy, to place
page break all the 66 lines (with a font 10, A4 paper) but if the ligne
66-132 etc.. is not free, the page break must be placed in a free
line..before like 65-64-63.

Thank you

Patrick



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
how do I remove dotted page break lines from my workbook pages? marcusaurelius Excel Discussion (Misc queries) 7 August 27th 07 11:44 AM
Excel 2K- Is Page break view limited to 16 pages? Martin Folley Excel Discussion (Misc queries) 1 September 13th 06 02:10 PM
Break cell into multiple lines by line break Chia Excel Discussion (Misc queries) 1 August 20th 06 06:37 AM
Line Break Ramthebuffs Excel Discussion (Misc queries) 4 August 22nd 05 08:52 PM
How do you format a row to break accross pages in Excel? DD Excel Worksheet Functions 4 May 4th 05 09:34 PM


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