This is how I would do it:
Option Explicit
Public Function valueInArray(myValue As Variant, myArray As Variant) As Boolean
Dim cnt As Long
For cnt = LBound(myArray) To UBound(myArray)
If CStr(myValue) = CStr(myArray(cnt)) Then
valueInArray = True
Exit Function
End If
Next cnt
End Function
Public Sub TestMe()
Debug.Print valueInArray("test", Array("ta", "to", 1, 2, "test"))
Debug.Print valueInArray("test1", Array("ta", "to", 1, 2, "test"))
End Sub
The valueInArray returns a boolean result, telling you whether the myValue is present in the array.