Thread: Pages setting
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 6,953
Default Pages setting

If the pagebreak is an automatic pagebreak, then the reason it is there is
that the printer has to break there - so the direction of movement would be
to include fewer rows on that page.

You can go through the HPageBreaks collection to find the pagebreaks. Just
keep in mind that unless this is just for your printer, it could be different
of different machines.

My experience with pagebreaks are that they are woefully inadequate for the
scenario you describe where you may be successively changing the pagebreak
for multiple pages - in otherwords, it doesn't work.


http://support.microsoft.com/?id=134731
XL: PageBreak Property Does Not Work as Expected


http://support.microsoft.com/?id=118589
XL: Macro to Check for Page Breaks on Worksheet


http://support.microsoft.com/?id=170635
XL97: Run-Time Error 9 When Using a Macro to Remove Page Break


http://support.microsoft.com/?id=89311
XL: Manual Page Breaks Ignored with Fit To Page/Adjust To


http://support.microsoft.com/?id=218104
XL97: "Subscript Out of Range" Using HPageBreaks or VPageBreaks.Location


http://support.microsoft.com/?id=210663
XL2000: "Subscript Out of Range" Using HPageBreaks or VPageBreaks.Location

I haven't visited those in a while, so no guarantee that they all still
exist.
--
Regards,
Tom Ogilvy


"OoOuio" wrote:

Hi,

I have a various number of rows generated in a worksheet.
So There is a various number of pagebreak in this sheet.
[I notice that the text in the last cell, of the last row just befre a
pagebreak is wrap to the first cell of the first row just after the
pagebreak.]

I would like to locate the the last row of each page, and the last cell of
this row.

Suppose i have two pages, i consider the last row(just before the break) of
the first page:

If this cell contains a carriage return, then i want to change the page
setting to the next row, if the next row contains a carraige return, do the
same process.
Or perhaps remove this carriage return maybe works fine, but how could i do
that?

Thanks