MTRename Method (MTNVS collection)

             

 

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

 

Syntax

object.MTRename OldName, NewName

 

The MTRename method syntax has these parts:

Part

Description

object

An object expression that evaluates to an MTNVS interface.

OldName

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

NewName

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

 

Remarks

Name matching takes the collection's MTStyle 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 MTReadOnly property is true.

pseNAMENOTFOUND

The collection does not contain an item whose MTName property matches OldName.

pseDUPLICATENAME

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

Enabling Operational Intelligence