Dim shu() As String
Dim s As Integer
For a = 1 To 5
For b = 1 To 5
If b <> a Then
For c = 1 To 5
If c <> b And c <> a Then
For d = 1 To 5
If d <> b And d <> a And d <> c Then
For f = 1 To 5
If f <> b And f <> a And f <> c And f <> d Then
s += 1
ReDim Preserve shu(s)
shu(s) = a & "," & b & "," & c & "," & d & "," & f
MsgBox(shu(s))
End If
Next
End If
Next
End If
Next
End If
Next
Next
Dim shu() As String
Dim s As Integer
For a = 1 To 5
For b = 1 To 5
If b <> a Then
For c = 1 To 5
If c <> b And c <> a Then
For d = 1 To 5
If d <> b And d <> a And d <> c Then
For f = 1 To 5
If f <> b And f <> a And f <> c And f <> d Then
s += 1
ReDim Preserve shu(s)
shu(s) = a & "," & b & "," & c & "," & d & "," & f
MsgBox(shu(s))
End If
Next
End If
Next
End If
Next
End If
Next
Next