Private Sub Form_Load() For i = 0 To 5 a(i) = i + 1
Next i i = i - 1 Call getallserial
End Sub Private Function getallserial() handle: If a(i) < 33 - 6 + i Then a(i) = a(i) + 1 Debug.Print a(0) & a(1) & a(2) & a(3) & a(4) & a(5) GoTo handle: Else If i > 0 Then i = i - 1 Call getallserial Else Exit Function End If End If End Function 我运行过了,没问题