Worksheets.HPageBreaks Property (Excel)

Returns an HPageBreaks collection that represents the horizontal page breaks on the sheet. Read-only.

expression .HPageBreaks

expression A variable that represents a Worksheets object.

There is a limit of 1026 horizontal page breaks per sheet.

This example displays the number of full-screen and print-area horizontal page breaks.

For Each pb in Worksheets(1).HPageBreaks 
 If pb.Extent = xlPageBreakFull Then 
 cFull = cFull + 1 
 cPartial = cPartial + 1 
 End If 
MsgBox cFull & " full-screen page breaks, " & cPartial & _ 
 " print-area page breaks"
© 2015 Microsoft