Delete Method
Deletes the specified object.
expression.Delete()
expression An expression that returns one of the objects listed above.
Remarks
If the Delete method is called on an XmlDataBinding or XmlMap object while an asynchronous binding is in progress, a run-time error will occur. You can determine if a data binding is asynchronous using the Async property of the XmlDataBinding object. You can determine whether a binding is in progress using the BindingInProgress property of the XmlDataBinding object.
Calling the Delete method on an XmlMap object without deleting the associated binding will generate a run-time error. To avoid this error, you must call the Delete method on the XmlDataBinding object that represents the associated binding first.
Deletes a single object from the specified collection.
expression.Delete(Index)
expression An expression that returns one of the objects listed above.
Index Required Variant. Specifies the name or number of the object to be deleted.
Deletes a single object from the specified collection.
expression.Delete(Index)
expression An expression that returns one of the objects listed above.
Index Required Long. Specifies the name or number of the object to be deleted.
Delete method as it applies to the Range object.
Deletes the specified cells from the worksheet.
expression.Delete(Shift)
expression An expression that returns one of the objects listed above.
Shift Optional Variant. Specifies how to shift cells to replace deleted cells. Can be one of the following XlDeleteShiftDirection constants: xlShiftToLeft or xlShiftUp. If this argument is omitted, Microsoft Excel decides based on the shape of the range.
Example
As it applies to the ChDataLabelsCollection collection.
This example deletes the data labels from the specified series in the chart workspace.
ChartSpace1.Charts(0).SeriesCollection(0).DataLabelsCollection.Delete 0