Rename Method (INamedValues2 interface)

             

 

Changes the name of one of the items in this NamedValues collection.

 

Syntax

object.Rename OldName, NewName

 

The Rename method syntax has these parts:

Part

Description

object

An object expression that evaluates to an INamedValues2 interface.

OldName

A String which must match the Name property of one of the items in the collection.

NewName

A String which becomes the new value of that item's Name property.

 

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.

 

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 OldName.

pseDUPLICATENAME

The collection already contains an item whose Name property matches NewName.

Enabling Operational Intelligence