XmlMappedRange.Insert Method (2007 System)
Inserts a cell into the XmlMappedRange control and shifts other cells away to make space.
Namespace: Microsoft.Office.Tools.Excel
Assembly: Microsoft.Office.Tools.Excel.v9.0 (in Microsoft.Office.Tools.Excel.v9.0.dll)
Syntax
'Declaration
Public Function Insert ( _
Shift As Object, _
CopyOrigin As Object _
) As Object
'Usage
Dim instance As XmlMappedRange
Dim Shift As Object
Dim CopyOrigin As Object
Dim returnValue As Object
returnValue = instance.Insert(Shift, CopyOrigin)
public Object Insert(
Object Shift,
Object CopyOrigin
)
public:
Object^ Insert(
Object^ Shift,
Object^ CopyOrigin
)
public function Insert(
Shift : Object,
CopyOrigin : Object
) : Object
Parameters
Shift
Type: System.ObjectSpecifies which way to shift the cells. Can be one of the following XlInsertShiftDirection values: xlShiftToRight or xlShiftDown. If this argument is omitted, Microsoft Office Excel selects a value.
CopyOrigin
Type: System.ObjectThe copy origin.
Return Value
Type: System.Object
Remarks
Optional Parameters
For information on optional parameters, see The Variable missing and Optional Parameters in Office Solutions.
Examples
The following code example uses the Insert method to insert a cell above an XmlMappedRange. This code example assumes that the current worksheet contains an XmlMappedRange named CustomerLastNameCell.
Private Sub InsertAbove()
Me.CustomerLastNameCell.Insert(Excel.XlInsertShiftDirection.xlShiftDown)
End Sub
private void InsertAbove()
{
this.CustomerLastNameCell.Insert(
Excel.XlInsertShiftDirection.xlShiftDown, missing);
}
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.