Nodes Collection Method: Remove 

Purpose

Remove a Node item from a Nodes collection.

Syntax

The Remove method has the syntax:

Boolean Remove(Variant vaWhat)

Description

Removes a Node object from the Nodes collection. The parameter vaWhat describes the element to be removed. Legal variant types for vaWhat are Object or any data type that can be converted into an integer value. If vaWhat has type Object, the corresponding object is removed from the collection. Otherwise vaWhat is converted to an integer and used to remove the corresponding node. If the node has any children, all children are removed prior to removing the node.

When removing a node from the Nodes collection, the Node object becomes invalid. Any further attempt to work on the object returns an Invalid Object Exception.