Search DaTutorials:  
HOME
VB Script Tutorials
Introduction
Reference
Tutorials

Add Method (Dictionary)

Adds a key and item pair to a Dictionary object.

object.Add key, item

Arguments

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.

The following example illustrates the use of the Add method:

Dim d   ' Create a variable.
Set d = CreateObject("Scripting.Dictionary")
d.Add "a", "Athens"   ' Add some keys and items.
d.Add "b", "Belgrade"
d.Add "c", "Cairo"

See Also

Add Method (Folders) | Exists Method | Items Method | Keys Method | Remove Method | RemoveAll Method

Applies To: Dictionary Object


     Mortgage Calculator | Internet Advertising | WoW Gold | Remortgages | Download PC Drivers
Home     Link To Us     Ad With Us     Contact Us     Tell A Friend     Affiliates     Blog     MsOfficeHelp