Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Function SortString(x As String, Optional bASC As Boolean = True) As String
Dim i, j, c, d
For i = 1 To Len(x) - 1
c = Mid(x, i, 1)
For j = i + 1 To Len(x)
d = Mid(x, j, 1)
If bASC Then
If d < c Then
x = Left(x, i - 1) & d & Mid(x, i + 1, j - i - 1) & c & Mid(x, j + 1)
i = 0: Exit For
End If
Else
If d > c Then
x = Left(x, i - 1) & d & Mid(x, i + 1, j - i - 1) & c & Mid(x, j + 1)
i = 0: Exit For
End If
End If
Next j
Next i
SortString = x
End Function