esthera
11-28-2007, 08:32 AM
i have the following function to determine if a string is in an array.
can someone help me fix it to instead of returning true/false it should return the amount of times it exists in the array. (and 0 if it doesn't exist)
Function InArray(strValue)
Dim i
For i = 0 to UBound(aracrust)
If selCriteria(i,1) = cstr(strValue) Then
InArray = TRUE
Exit Function
End If
Next
InArray = FALSE
End Function
can someone help me fix it to instead of returning true/false it should return the amount of times it exists in the array. (and 0 if it doesn't exist)
Function InArray(strValue)
Dim i
For i = 0 to UBound(aracrust)
If selCriteria(i,1) = cstr(strValue) Then
InArray = TRUE
Exit Function
End If
Next
InArray = FALSE
End Function