This is a ShellSort I have translated from "FORTRAN programs for scientists and engineers" by Alan R. Miller
This will take a array of strings (MaxLimit) and sort them smallest to largest.
If you have any trouble let me know![]()
Public Sub ShellSort(MaxLimit() As String) Dim J As Integer Dim i As Integer Dim Jump As Integer Dim J2 As Integer Dim J3 As Integer Dim HldDis As String Jump = UBound(MaxLimit) 10 Jump = Jump / 2 If Jump > 0 Then J2 = UBound(MaxLimit) - Jump J = 0 While J <= J2 i = J 20 J3 = i + Jump If MaxLimit(J3) <= MaxLimit(i) Then GoTo 30 HldDis = MaxLimit(J3) MaxLimit(J3) = MaxLimit(i) MaxLimit(i) = HldDis i = i - Jump If i >= 0 Then GoTo 20 30 J = J + 1 Wend GoTo 10 End If End Sub
Happy Coding![]()




Reply With Quote