Skip to content

Latest commit

 

History

History
50 lines (32 loc) · 1.01 KB

Excel.Sheets.HPageBreaks.md

File metadata and controls

50 lines (32 loc) · 1.01 KB
title keywords f1_keywords api_name ms.assetid ms.date ms.localizationpriority
Sheets.HPageBreaks property (Excel)
vbaxl10.chm152084
vbaxl10.chm152084
Excel.Sheets.HPageBreaks
5c7671c6-a00e-5183-db25-898509c7f8e8
05/15/2019
medium

Sheets.HPageBreaks property (Excel)

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

Syntax

expression.HPageBreaks

expression A variable that represents a Sheets object.

Remarks

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

Example

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 
 Else 
 cPartial = cPartial + 1 
 End If 
Next 
MsgBox cFull & " full-screen page breaks, " & cPartial & _ 
 " print-area page breaks"

[!includeSupport and feedback]