Remove Method (INamedValues2 interface)

             

 

Removes an item from this NamedValues collection.

 

Syntax

object.Remove Name

 

The Remove method syntax has these parts:

Part

Description

object

An object expression that evaluates to an INamedValues2 interface.

Name

A String which must match the Name property of the item to be removed.

 

Remarks

Name matching takes the collection's Style property into account. This specifies case and locale sensitivity, and whether leading and trailing blanks are trimmed.

The removed item becomes an orphan; that is, its Parent property becomes Nothing.

Another way to remove an item from a collection is to call the item's Detach method, which has the same effect.

 

Trappable Errors

In addition to generic errors (such as Out of Memory), the following errors may occur:

Error

Description

pseACCESSDENIED

The collection cannot be modified because it is frozen; that is, its ReadOnly property is true.

pseNAMENOTFOUND

The collection does not contain an item whose Name property matches Name.

Enabling Operational Intelligence