Skip to content

Files

Latest commit

author
Docs Allowlist Management
Mar 22, 2024
76d3237 · Mar 22, 2024

History

History
51 lines (31 loc) · 1.07 KB

Excel.HPageBreaks.Add.md

File metadata and controls

51 lines (31 loc) · 1.07 KB
title keywords f1_keywords api_name ms.assetid ms.date ms.localizationpriority
HPageBreaks.Add method (Excel)
vbaxl10.chm165076
vbaxl10.chm165076
Excel.HPageBreaks.Add
58aabcbf-7a9f-96a5-c91e-7311e397cffe
04/26/2019
medium

HPageBreaks.Add method (Excel)

Adds a horizontal page break.

Syntax

expression.Add (Before)

expression A variable that represents an HPageBreaks object.

Parameters

Name Required/Optional Data type Description
Before Required Object A Range object. The range above which the new page break will be added.

Return value

An HPageBreak object that represents the new horizontal page break.

Example

This example adds a horizontal page break above cell F25 and adds a vertical page break to the left of this cell.

With Worksheets(1) 
 .HPageBreaks.Add .Range("F25") 
 .VPageBreaks.Add .Range("F25") 
End With

[!includeSupport and feedback]