L
Liger ZERO
Guest
Is there a built in function in Visual Basic that will alphabetize an array of variables?
Sub sorter(theArray)
Dim indexLimit As Long, lastSwap As Long
Dim firstItem As Long
Dim index As Long
Dim value As Variant
Do
indexLimit = UBound(theArray) - 1
lastSwap = 0
For index = firstItem To indexLimit
value = theArray(index)
If (value > theArray(index + 1)) Then
theArray(index) = theArray(index + 1)
theArray(index + 1) = value
lastSwap = index
End If
Next
Loop While lastSwap
For i = 0 To UBound(theArray) - 1
testing(i) = theArray(i)
Next i
End Sub