Dictionary.Value
The Value property allows you to get or set a name/value pair in the Dictionary.
Definition
Property Value(bstrName As String) As Variant
Parameters
bstrName
A String that contains the name of the Dictionary key for which to retrieve a value or put a value.
Error Values
This property sets the Number property of the global Err object to S_OK (&H00000000) to indicate success and to standard COM error values to indicate failure. For more information about standard COM errors, see Standard COM Errors. Additional information may be available using the global Err object. In particular, the Description property may contain a text description of the error.
Remarks
For more information about memory ownership issues related to COM property and method parameters, see Managing COM Parameter Memory.
Example
' dDict is a Commerce.Dictionary object
' first_name is a Dictionary key
' v_first_name is a Variant
v_first_name = dDict.value("first_name")
v_first_name = dDict("first_name")
' use this form if the value contains an object reference:
Set oSubObject = dDict("myObjectKey")
' Property syntax
' Note: There is a slight performance penalty for using
' these forms because a special implementation of IDispatch is used
v_first_name = dDict.first_name
' If the key begins with an underscore then use braces around the key name
v_first_name = dDict.[_first_name]