02-17-2011, 09:28 PM
Code:
Function ArrayFind(arrToSearch,strToFind)
Dim aIter
For aIter=0 To UBound(arrToSearch)
If Replace(Trim(arrToSearch(aIter)), chr(32), chr(160))=Replace( Trim(strToFind), chr(32), chr(160)) Then
ArrayFind=aIter+1
Exit Function
End If
Next
ArrayFind=-1
End Function
If ArrayFind(TestArray ,DataTable("GotValue", dtGlobalSheet)) <> -1 'help me' Then
...This code will execute if "GotValue" is in the TestArray
End If