+ Reply to Thread
Results 1 to 3 of 3

pages break in the 66rd line , 132, etc...

  1. #1
    ...Patrick
    Guest

    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. #2
    Tom Ogilvy
    Guest

    RE: 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 Before:=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
    >
    >
    >


  3. #3
    ...Patrick
    Guest

    Re: pages break in the 66rd line , 132, etc...

    Thank you Tom

    i go to "play" with this ...

    Patrick


    "Tom Ogilvy" <[email protected]> a écrit dans le message
    de news: [email protected]...
    > 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 Before:=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 to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1