ERFORDERLICHE
OBJEKTE
1 Listbox (List1)
2 CommandButtons (Command1, Command2)
1 Textbox (Text1)
FORM-CODE
Sub Textdreher(x As String, y As String)
Dim i As Integer, j As Integer
j = Len(y)
If j < 2 Then
List1.AddItem x & y
List1.ListIndex = List1.ListCount - 1
Caption = List1.ListCount & " Möglichkeiten"
Else
For i = 1 To j
Call Textdreher(x + Mid(y, i, 1), Left(y, i - 1) + _
Right(y, j - i))
Next i
End If
End Sub
Private Sub Command1_Click()
List1.Clear
Call Textdreher("", Text1.Text)
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub Form_Load()
Command1.Caption = "&Start"
Command2.Caption = "&Beenden"
Text1.Text = "Hallo"
End Sub
|