Add method
Adds a key and item pair to a Dictionary object.
Syntax
object.Add key, item
The Add method has the following parts:
Part | Description |
---|---|
object | Required. Always the name of a Dictionary object. |
key | Required. The key associated with the item being added. |
item | Required. The item associated with the key being added. |
Remarks
An error occurs if the key already exists.
See also
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.