Have you tried using ISNULL() .
isnull() would not give me an answer to my question. i clarify with an example:
i have a string array,
arrStrings(), containing five different strings. i have a variable,
strValue, containing a value i want to test for. what i want is a function that, regardless of the data types (in this case
string), can return to me whether or not strValue is exactly the same as any one or more of the elements in arrStrings().
A function to do what i want for strings would be this:
- Function InStrArray(val as string, arr() as string)
-
InStrArray = False
-
-
dim i as integer
-
for i = lbound(arr) to ubound(arr)
-
if arr(i) = value then InStrArray = True
-
next
-
End Function
I want to do the same,
but regardless of datatypes. That is, I want to be able to use my function on string arrays as well as file, control and other arrays.