Dim A(10)
A(0) = ZZZZZ
A(1) = Abbbb
A(2) = AAAAAA
Public IsSort
Function IsSorted (Ar,sort_type)
IsSort = True
For i=0 To UBound(Ar)-1
If StrComp(Ar(i), Ar(i+1),sort_type) = 1 Then
IsSort = False
Exit Function
End If
Next
End Function
Call IsSorted(A,1)
MsgBox IsSort
No comments:
Post a Comment