Skip to content

Latest commit

 

History

History
59 lines (37 loc) · 1.89 KB

Excel.HPageBreaks.md

File metadata and controls

59 lines (37 loc) · 1.89 KB
title keywords f1_keywords api_name ms.assetid ms.date ms.localizationpriority
HPageBreaks object (Excel)
vbaxl10.chm163072
vbaxl10.chm163072
Excel.HPageBreaks
087106a7-ded7-d672-095d-98e7012fa440
03/30/2019
medium

HPageBreaks object (Excel)

The collection of horizontal page breaks within the print area.

Remarks

Each horizontal page break is represented by an HPageBreak object.

If you add a page break that does not intersect the print area, 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 Application property, Count property, Item property, Parent property, or Add method is used in conjunction with the HPageBreaks property of the Worksheet object:

  • For an automatic print area, the HPageBreaks property applies only to the page breaks within the print area.

  • For a user-defined print area of the same range, the HPageBreaks property applies to all of the page breaks.

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.

ActiveSheet.HPageBreaks.Add Before:=ActiveCell

Methods

Properties

See also

[!includeSupport and feedback]