Choosing the best sort depends on the type of data structure and a host of factors about the data. If the data is nearly always in order then an array of strings can be sorted quite efficiently with a simple bubble sort. However the bubble sort's worst case performance would be if the data was in reverse order. If the data is in a sufficiently random orderthen a quick sort would work better. However a quick sort's worse case is if the data is in order or near order. There are other issues - how long are the strings, is there ancillary data that needs to be moved etc. Anyway here is a simple bubble sort:
Dim iPass, iNdx, iCompVal as Integer
Dim strSwap as String
For iPass = 0 to arySize - 1
For iNdx = 0 to arySize - 1
iCompVal = strComp(aryName(iNdx), aryName(iNdx + 1)
If iCompVal = 1 'returns 1 for str1 > str2
strSwap = aryName(iNdx)
aryName(iNdx) = aryName(iNdx + 1)
aryName(iNdx + 1) = strSwap
End If
Next
Next
I have many other sorting algorithms if this is not helpful
HTH,
JC