This documentation is archived and is not being maintained.

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)

'Usage
Dim range1 As Range

Dim returnValue As Integer
returnValue = range1.PageBreak

Dim sampleValue As Integer
range1.PageBreak = sampleValue

'Declaration
Property PageBreak() As Integer
public int get_PageBreak();
public void set_PageBreak(int);
function get PageBreak() : int;
function set PageBreak(int);

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.


Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Development Platforms

Windows XP Home Edition, Windows XP Professional, Windows Server 2003, and Windows 2000

Target Platforms

Show: