


Registered forum members do not see this ad.
Finding text in Array2(jx) <> ""?
My program looks at the statement Array2(jx) <> ""to see if there is
any text in Array2(jx). If Array2(jx) does not equal "" there should
be text in Array2(jx). I don't think this works in a batch loop so is there
another way to check to see if I have text in Array2(jx) ?
thank you,
Registered forum members do not see this ad.
In VBA it is impossible to check up conformity of elements of an array to the certain condition without using loop. You should write about such function (very simplified example, without checks) and to use it in your programs:
In LISP it is possible for lists:Code:Public Function IsNonEmptyStringsInArray(Arr() As String) As Boolean Dim Out As Boolean Out = False For i = LBound(Arr) To UBound(Arr) If Arr(i) <> "" Then Out = True End If Next i IsNonEmptyStringsInArray = Out End Function
Testing:Code:(defun IsNonEmptyStringsInList(StrLst / Out) (mapcar '(lambda(x)(if(/= x "")(setq Out T)))StrLst) Out)
Code:_$ (IsNonEmptyStringsInList '("" "" "" "")) nil _$ (IsNonEmptyStringsInList '("" "" "Yes!" "")) T
Bookmarks