expression.Insert(Shift)
expression Required. An expression that returns one of the objects in the Applies To list.
Shift Optional XlInsertShiftDirection. Specifies which way to shift the cells.
XlInsertShiftDirection can be one of these XlInsertShiftDirection constants. |
xlShiftToRight |
xlShiftDown
If this argument is omitted, Microsoft Graph decides based on the shape of the range. |
Example
This example inserts a new row before row four on the datasheet.
myChart.Application.DataSheet.Rows(4).Insert
This example inserts new cells at the range A1:C5 on the datasheet and shifts cells downward.
Set mySheet = myChart.Application.DataSheet
mySheet.Range("A1:C5").Insert Shift:=xlShiftDown