The VBA syntax for the add method of the dictionary class is given as:
Dictionary.Add (Key as String, Item as Variant)
But actually including these parentheses generates a syntax error.
So if D is an object of type dictionary, then vba expects: D.Add "key1", "value1"
and not:
D.Add("key1", "value1") <= this generates an error!
Contrasting the Add method with Exists:
Dictionary.Exists (Key as String)
The parentheses are actually expected:
V1 = D.Exists("key1")
So why is it that the Add syntax specifies ()'s, but doesn't actually expect them (and even generates an error if they are used), while the Exists syntax specifies them and does actually expect them?