Danke für eure hilfe!
Sub buchstaben()
Dim i As Integer
Dim x As Integer
Dim h As Integer
Dim y As Integer
Dim hilf As Integer
Dim strmessage As String
x = InputBox("Geben sie die Anzahl der zu sortierenden Buchstaben ein", "Eingabe")
ReDim b(1 To x) As String
For i = LBound(b) To UBound(b)
b(i) = InputBox("Geben sie einen Buchstaben ein", "Eingabe")
b(i) = Asc(b(i))
Next i
For h = LBound(b) To UBound(b) - 1
For i = LBound(b) To UBound(b) - 1
If b(i) > b(i + 1) Then
hilf = b(i)
b(i) = b(i + 1)
b(i + 1) = hilf
End If
Next i
Next h
For i = LBound(b) To UBound(b)
b(i) = Chr(b(i))
Next i
For i = LBound(b) To UBound(b)
strmessage = strmessage + b(i) + vbLf
Next i
MsgBox strmessage
End Sub