Range.PageBreak Property
Returns or sets the location of a page break.
Namespace: Microsoft.Office.Interop.Excel
Assembly: Microsoft.Office.Interop.Excel (in Microsoft.Office.Interop.Excel.dll)
Syntax
'Declaration
Property PageBreak As Integer
Get
Set
'Usage
Dim instance As Range
Dim value As Integer
value = instance.PageBreak
instance.PageBreak = value
int PageBreak { get; set; }
Property Value
Type: System.Int32
Remarks
The return value can be one of the following XlPageBreakconstants:
xlPageBreakAutomatic
xlPageBreakManual
xlPageBreakNone
This property can return the location of either automatic or manual page breaks, but it can only set the location of manual breaks (it can only be set to xlPageBreakManual or xlPageBreakNone).
To remove all manual page breaks on a worksheet, set Cells.PageBreak to xlPageBreakNone.