HPageBreak.DragOff Method
Drags a page break out of the print area.
Namespace: Microsoft.Office.Interop.Excel
Assembly: Microsoft.Office.Interop.Excel (in Microsoft.Office.Interop.Excel.dll)
Syntax
'Declaration
Sub DragOff ( _
Direction As XlDirection, _
RegionIndex As Integer _
)
'Usage
Dim instance As HPageBreak
Dim Direction As XlDirection
Dim RegionIndex As Integer
instance.DragOff(Direction, RegionIndex)
void DragOff(
XlDirection Direction,
int RegionIndex
)
Parameters
Direction
Type: Microsoft.Office.Interop.Excel.XlDirectionRequired XlDirection. The direction in which the page break is dragged. XlDirection can be one of these constants:
xlDown
xlToRight
xlToLeft
xlUp
RegionIndex
Type: System.Int32Required Integer. The print-area region index for the page break (the region where the mouse pointer is located when the mouse button is pressed if the user drags the page break). If the print area is contiguous, there’s only one print region. If the print area is noncontiguous, there’s more than one print region.
Remarks
This method exists primarily for the macro recorder. You can use the Delete method to delete a page break programmatically.