Public Function ExistKey(ByRef c As Collection, _
ByVal k As Variant) As Boolean
On Error Resume Next
Call VarType(c(k))
ExistKey = (Err.Number == 0)
If Err.Number <> 0 Then Err.Clear
End Function
Public Function ExistKey(myColl As Collection , strKey As string ) as Boolean
On Error Goto err1
myColl.Add "a",strKey
myColl.Remove strKey
ExistKey = False
Exit Function
err1:
Err.Clear
ExistKey = True
End Function
Public Function ExistKey(myColl As Collection , strKey As string ) as Boolean
On Error Goto err1
myColl.Add "a",strKey
ExistKey = False
Exit Function
err1:
Err.Clear
ExistKey = True
End Function