title | keywords | f1_keywords | api_name | ms.assetid | ms.date | ms.localizationpriority | ||
---|---|---|---|---|---|---|---|---|
HPageBreaks.Add method (Excel) |
vbaxl10.chm165076 |
|
|
58aabcbf-7a9f-96a5-c91e-7311e397cffe |
04/26/2019 |
medium |
Adds a horizontal page break.
expression.Add (Before)
expression A variable that represents an HPageBreaks object.
Name | Required/Optional | Data type | Description |
---|---|---|---|
Before | Required | Object | A Range object. The range above which the new page break will be added. |
An HPageBreak object that represents the new horizontal page break.
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]