Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() doesnt this always add a page break no matter what, whether or not th table fits. I tried it anyways and got a runtime error "application-defined or object-defined error." Set rnData = ActiveSheet.UsedRange Let irows = rnData.CurrentRegion.Rows.Count Let Count = irows + 26 Range("A" & Count).Activate ActiveWindow.SelectedSheets.HPageBreaks.Add _ Befo=ActiveCell ActiveWindow.SelectedSheets.VPageBreaks.Add _ Befo=ActiveCell I would like to only add a page break, if the entire table (which is 2 rows, plus 5 rows spacing) doesnt fit on the last page. In other words if there isnt 26 lines left till the end of the page, I want to add page break before the table....is this possible? -- tess45 ----------------------------------------------------------------------- tess457's Profile: http://www.excelforum.com/member.php...fo&userid=1393 View this thread: http://www.excelforum.com/showthread.php?threadid=26619 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
moving page breaks | Setting up and Configuration of Excel | |||
moving items within the page | Excel Worksheet Functions | |||
moving a paragraph to the next page. | Excel Discussion (Misc queries) | |||
Moving information to a different page | Excel Worksheet Functions | |||
moving table to next page | Excel Programming |