Hi,
How do you know how many substrings an array contains after using split?
My code needs the number of elements as it has to peform some actions on that:
But how can I know "numberofvaluesinarrayinputvalue"?
I don't find any property that contains that..
Thanks!
How do you know how many substrings an array contains after using split?
My code needs the number of elements as it has to peform some actions on that:
Code:
Function findexpression(inputvalue As String, inputexpression As String) As Boolean 'In case the rules is a regular expression, the check is done on the regular expression (landmarks-layer)
Dim arrayinputvalue
Dim previousvalue As Variant
arrayinputvalue = Split(inputexpression, ",") 'returns an array containing a specified number of substrings
previousvalue = ""
For i = 0 To i = numberofvaluesinarrayinputvalue
If arrayinputvalue(i) < inputexpression And arrayinputvalue(i) <> previousvalue Then
findexpression = True
Else
findexpression = False
End If
previousvalue = arrayinputvalue(i)
Next i
End Function
But how can I know "numberofvaluesinarrayinputvalue"?
I don't find any property that contains that..
Thanks!