Delete Method (ActiveX/CAO)

Deletes a specified object.

Signature

VBA / VB.NET

object.Delete(Index)
object

Type: LabelTemplates, Link, LinkTemplates, or Queries

The object or objects this method applies to.

Index

Type: Variant; input-only

The index location in the collection. The index must be either an integer or a string. If an integer, the index must be between 0 and N-1, where N is the number of objects in the collection or selection set.

Remarks

When you delete an object in a collection, all remaining items in the collection are reassigned a new index based on the current count.