MTRename Method (MTNV object)

             

 

Changes the name of this MTNV object.

Syntax

object.MTRename NewName

 

The MTRename method syntax has these parts:

Part Description
object An object expression that evaluates to an MTNV object.
NewName A String which becomes the new value of the Name property.

 

Remarks

If the object is an orphan (its MTParent property is Nothing), the new name is simply written into the object's MTName property.

If the object has a parent, then depending on the setting of the parent's MTStyle property, any leading or trailing blanks may be stripped from NewName before renaming the object. Also, the rename will fail if there is already an object with the same name in the parent collection. The equality test takes the parent's pinvCaseSensitive and pinvLocaleSensitive style flags into account.

 

Trappable Errors

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

Error Description
pseACCESSDENIED The object's parent collection cannot be modified because it is frozen; that is, the collection's MTReadOnly property is true.
pseDUPLICATENAME The object's parent collection already contains an item with the given name.
Enabling Operational Intelligence