Add Method (NamedValues collection)

             

 

Creates a new NamedValue and adds it to the collection.

 

Syntax

object.Add Name, Value

The Add method syntax has these parts:

Part

Description

object

An object expression that evaluates to a NamedValues object.

Name

A string expression which will become the name of the newly added object.

Value

A Variant expression which will become the value of the newly added object.

 

Remarks

Returns a reference to the newly created NamedValue object.

 

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, the collection's ReadOnly flag is true.

pseDUPLICATENAME

The collection already contains an item with the given name.

Enabling Operational Intelligence