Access/VBA Library

Contains Method

Boolean indicating whether the specified element exists in the array or not.

Syntax

array_.Contains( Value )
Parameters
Name Type Description
array_   The name of an object of type array_
Value Variant Required. Value of the element to be searched.
Example
  Dim x As New Array_

  x.Add "Element one"
  x.Add "Element two"
  Debug.Print x.Contains("one") ' Result = True
  Debug.Print x.Contains("three") ' Result = False