是不是意思说 选3个 每3个都不相同---希望 我没忘记 排列组合...
Private Sub cmdCommand1_Click()
Dim num1 As Integer, num2 As Integer, num3 As Integer
num1 = Rnd * 9
num2 = Rnd * 9
Do While num2 = num1
num2 = Rnd * 9
Loop
num3 = Rnd * 9
Do While num3 = num1 Or num3 = num2
num3 = Rnd * 9
Loop
Debug.Print num1 & " " & num2 & " " & num3
End Sub
试试 看OK不...