upload/200931902733319297.gif
Option Explicit
Dim D(999) As Boolean
Dim A(2) As Byte

Private Sub cmdCommand1_Click()
Dim I As Long, S As String
For I = 0 To 999
S = Format(I, "000")
A(0) = Val(Left$(S, 1))
A(1) = Val(Mid$(S, 2, 1))
A(2) = Val(Right$(S, 1))
VBA.DoEvents
Call M
Next I
End Sub

Sub M()
Dim X As Byte, Y As Byte, Z As Byte
Dim T As String

For X = 0 To 2
For Y = 0 To 2
For Z = 0 To 2
If X <> Y And X <> Z And Y <> Z Then
T = A(X) & A(Y) & A(Z)
If D(Val(T)) <> True Then
List1.AddItem T
D(Val(T)) = True
End If
End If
Next Z
Next Y
Next X
End Sub

'不过是
000,
001, 001 010 100
002,002 020 200
...
110, 110 011 101
这样的枚举。