PDA

View Full Version : Solved: Page Break



DevanG
07-27-2011, 05:56 AM
Having a problem setting a page break on a page of mine. The code steps through and I watch it, but the automatic page break stays and no page break is added. The automatic page break is around line 83. I need it at 93 instead.

My latest attempt looks like this..


Sheets("RSRevDiscGIA").ResetAllPageBreaks
Sheets("RSRevDiscGIA").HPageBreaks.Add Before:=Sheets("RSRevDiscGIA").Rows(93)

i have also tried..


Sheets("RSRevDiscGIA").ResetAllPageBreaks
Worksheets("RSRevDiscGIA").Rows(93).PageBreak = xlPageBreakManual

Kenneth Hobs
07-27-2011, 07:03 AM
Think of it as you do in MSWord. If you add a hard page break after the soft break occurs, that is what is happening. You need to resize your rows and change fonts if you want that or set the print to fit all or change paper size.

DevanG
07-27-2011, 07:38 AM
Think of it as you do in MSWord. If you add a hard page break after the soft break occurs, that is what is happening. You need to resize your rows and change fonts if you want that or set the print to fit all or change paper size.

Thanks! just had to move some information up above the soft break and there it goes.