Private Sub Command1_Click()
Dim a(0 To 4) As String
Dim b(0 To 4) As Integer
Dim s As String, r As String ,i As Integer, j As Integer
List1. Clear
s = Text1.Text: n = Len(s)
For i=0 To n-1
a(i) = Mid(s, i+ 1, 1)
b(i) = ①
Next i
c =0
For i=1 To n^n
r =“”
For j=0 To n-1
r= ②
Next j
List1. AddItem r
k=n-1
b(k)=b(k)+1
Do While b(k)=n And k>0
b(k) = n-1 '③改错
k=k-1
b(k)=b(k)+1
Loop
Next i
End Sub