Remarks

Each horizontal page break is represented by an object.

If you add a page break that does not intersect the print area, then the newly-added HPageBreak object will not appear in the HPageBreaks collection for the print area. The contents of the collection may change if the print area is resized or redefined.

When the property, property, property, property or method is used in conjunction with the HPageBreaks property:

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

Example

Use the HPageBreaks property to return the HPageBreaks collection. Use the Add method to add a horizontal page break. The following example adds a horizontal page break above the active cell.

Visual Basic for Applications
ActiveSheet.HPageBreaks.Add Before:=ActiveCell
H Page Breaks Collection Object HPageBreak Collection HPageBreak Collection Object HPageBreak?

See also: