About Deleting a Member of a Collection Object (ActiveX)

To delete a specific dimension style, use the Delete method found on the member object.

For example, the following code deletes the layer ABC:

AutoLISP
(setq acadObj (vlax-get-acad-object)
      doc (vla-get-ActiveDocument acadObj)
      ABCLayer (vla-Item (vla-get-Layers doc) "ABC"))
(vla-Delete ABCLayer)
VBA (AutoCAD Only)
Dim ABCLayer as AcadLayer
Set ABCLayer = ThisDrawing.Layers.Item("ABC")
ABCLayer.Delete

Once an object has been deleted, you must never attempt to access the object again later in the program.