Add Method (VPageBreaks Collection)

Applies To

VPageBreaks collection object.

Description

Adds a vertical page break. Returns a VPageBreak object.

Syntax

object.Add(Before)

object Required. An expression that returns a VPageBreaks object.

Before Required Object. A Range object. The range to the left of which the new page break will be added.

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