vba collection contains
' Vba collection contains
Public Function ExistsInCollection(col As Collection, pKey As Variant) As Boolean
On Error GoTo err
ExistsInCollection = True
IsObject (col.Item(pKey))
Exit Function
err:
ExistsInCollection = False
End Function