Function Hash Table Class

Update

Update the Item of the hash table definition identified by Key .

Signature (Visual Basic / VBA)

Public Function Update( _
      ByVal vKey As Variant _
    , ByVal vItem As Variant _
    ) As Boolean

Code Example

    Assuming
       Dim htTemp As New HashTable
       htTemp.Add "FunctionName", 23
       Dim bResult As Boolean
    for example
       bResult = htTemp.Update("FunctionName", 24)
    leaves
       bResult = True
    and
       bResult = htTemp.Update("StringReverse", 24)
    leaves
       bResult = False

Parameters

Parameter Description
vKey The string or numeric identifier whose Item will be updated to vItem.
vItem New Item that will be associated with the key vKey if that key already exists within the hash table. vItem can be any type of Variant value (vbString, numeric, vbDate, vbObject, vbArray, etc.).

Return Value

Method returns True if the Key was found and the Item was updated, and it returns False otherwise.

Notes & Version History

v1.3 BugFix This method has been fixed to support the storage of Object and DataObject type Items .