Function HasKey( _
    coll As Collection, _
    index As Variant _
) As Boolean
On Error GoTo ErrorHandler
    Dim elTest As Variant
    HasKey = False
    elTest = coll(index)
    HasKey = True
    Exit Function
ErrorHandler:
End Function

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *