Function sortalphabet(ByVal wrd As String)
sortalphabet = ""
Dim myarr() As String
Dim Length As Integer = Len(wrd)
ReDim myarr(Length)
For i = 1 To Length
Dim charac As String = Mid(wrd, i, 1)
myarr(i - 1) = charac
Next
Dim Sorted As Boolean = False
Do While Not Sorted
Sorted = True
For x = 0 To UBound(myarr) - 1
If myarr(x) > myarr(x + 1) Then
Dim temp As String = myarr(x + 1)
myarr(x + 1) = myarr(x)
myarr(x) = temp
Sorted = False
End If
Next
Loop
sortalphabet = Join(myarr, Space(0))
End Function
sortalphabet = ""
Dim myarr() As String
Dim Length As Integer = Len(wrd)
ReDim myarr(Length)
For i = 1 To Length
Dim charac As String = Mid(wrd, i, 1)
myarr(i - 1) = charac
Next
Dim Sorted As Boolean = False
Do While Not Sorted
Sorted = True
For x = 0 To UBound(myarr) - 1
If myarr(x) > myarr(x + 1) Then
Dim temp As String = myarr(x + 1)
myarr(x + 1) = myarr(x)
myarr(x) = temp
Sorted = False
End If
Next
Loop
sortalphabet = Join(myarr, Space(0))
End Function