Udostępnij za pośrednictwem


WorksheetBase.VPageBreaks Property

Definition

Gets a VPageBreaks collection that represents the vertical page breaks on the sheet.

public:
 property Microsoft::Office::Interop::Excel::VPageBreaks ^ VPageBreaks { Microsoft::Office::Interop::Excel::VPageBreaks ^ get(); };
public Microsoft.Office.Interop.Excel.VPageBreaks VPageBreaks { get; }
member this.VPageBreaks : Microsoft.Office.Interop.Excel.VPageBreaks
Public ReadOnly Property VPageBreaks As VPageBreaks

Property Value

A VPageBreaks collection that represents the vertical page breaks on the sheet.

Examples

The following code example uses the VPageBreaks property to add a vertical page break at cell C5.

This example is for a document-level customization.

private void InsertPageBreaks()
{
    Excel.HPageBreak hbreak =
        this.HPageBreaks.Add(this.Range["C5"]);
    Excel.VPageBreak vbreak =
        this.VPageBreaks.Add(this.Range["C5"]);
}
Private Sub InsertPageBreaks()
    Dim hbreak As Excel.HPageBreak = _
        Me.HPageBreaks.Add(Me.Range("C5"))
    Dim vbreak As Excel.VPageBreak = _
        Me.VPageBreaks.Add(Me.Range("C5"))
End Sub

Applies to