Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() A slightly different solution using a For/Next loop. It works for me. Sub InsertPageBreaks() Dim FindRange As Range With Sheets("Sheet1") Set FindRange = .Range(.Range("B2"), .Range("B2").End(xlDown)) End With Dim Cell As Object Dim q As Long Worksheets("Sheet1").ResetAllPageBreaks For Each Cell In FindRange If Cell.Value = 1 Then q = Cell.Row Sheets("Sheet1").Rows(q).PageBreak = xlPageBreakManual End If Next Cell End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel 2007 Page Break Adjustments causes a page break each cell | Excel Worksheet Functions | |||
VBA Code-listing page break | Excel Programming | |||
change and/or remove page number watermark in page break preview | Excel Discussion (Misc queries) | |||
adding a new page break to an existing page break | Excel Discussion (Misc queries) | |||
Code to insert a Page Break | Excel Programming |