vba collection contains

The solution for “vba collection contains” can be found here. The following code will assist you in solving the problem.

‘ 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

Thank you for using DeclareCode; We hope you were able to resolve the issue.

More questions on [categories-list]

Similar Posts