LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Setting page breaks (another)

Use automatic pagebreaks to tell you where the next page break is.

force a pagebreak before that.

However, where the pagebreak is will be dependent on the activeprinter. If
you change printers, it could change where the automatic pagebreak falls.

--
Regards,
Tom Ogilvy

"Ian W" <email@ianwllms(at)canada(dot)com wrote in message
...
Hello group,

Need a little help with this as my Excel skills are a little rusty.

I have a spreadsheet with repeating blocks of data in three rows.
First row cell 1 spans cols 1-9,
second row cell 1 spans rows 2-3, cell 2 spans cols 2-9
third row,each is (after first is unique, but height of row 3 is variable
There's the occasional header row to skew the count as well
ie:
--------------------------
--|-----------------------
|--|--|--|--|--|--|--|--
--------------------------
--|-----------------------
|--|--|--|--|--|--|--|--

I need to set the page breaks prior to the repeating first row.

How do I find out:
- how many rows fit on a page given the varying row height; ie how many
points on a page (is it screen/printer dependent)?
- how to figure out I'm in a first row

Once I have the answer to the first part,
i think I can
loop through each row,
add the Cells.RowHeight
until over the PointsPerPageLimit
then go back
until the Rows(row).MergeCells is true and Rows(row).MergeArea.Count =9
then ActiveSheet.HPageBreaks.Add befo=Cells (Row, 0)

Does this make sense, and thanks for your help.

Ian.



 
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
Setting Page Breaks Ken Hudson Excel Discussion (Misc queries) 1 January 5th 10 08:47 PM
recalculate page breaks after setting Zoom in pagesetup Par Excel Discussion (Misc queries) 3 June 21st 07 03:24 PM
setting page breaks for whole spreadsheet to be consistent? Mickey Setting up and Configuration of Excel 1 May 15th 07 12:50 AM
having trouble setting page breaks on excel- have ms 2000 Jen Excel Discussion (Misc queries) 0 April 20th 05 02:29 PM
Are conditional formats available for setting page breaks? Nicky Armstrong Excel Discussion (Misc queries) 1 February 20th 05 03:51 PM


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