Thread: Page Break
View Single Post
  #2   Report Post  
Ron de Bruin
 
Posts: n/a
Default

Hi Sheri

Try this tester
I check all blanks in A1:A20

Sub Insert_PageBreaks()
Dim cell As Range
ActiveSheet.ResetAllPageBreaks
On Error Resume Next
For Each cell In Range("A1:A20").SpecialCells(xlCellTypeBlanks)
ActiveSheet.HPageBreaks.Add Befo=Cells(cell.Row, 1)
Next
On Error GoTo 0
End Sub


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Sheri" wrote in message ...
I need Excel to insert a page break at every blank row. The number of rows
per page will be different each time I run the report, so the row number will
change each time. I have been inserting the page breaks manually, but it is
a very time consuming process with such a long report.
--
Sheri