DeleteObject 

Use this method to delete an object. Methods and the root object cannot be deleted. Returns 0 if successful or non-zero.

Syntax

DeleteObject (ByVal hobj As Long ) as Long

Part

hobj

Description

Required. Unique index of object to be deleted.