Private Sub Form_KeyPress(KeyAscii As Integer)
Dim a(), i As Integer
Dim selectNO1,selectNO2 ,selectNO3 as Integer
a = Array(12, 32, 23, 43, 354, 232, 433, 3534, 523, 5555)
Randomize
selectNO1 = Int(Rnd * 10)
Debug.Print a(selectNO1)
SELECT2:
selectNO2 = Int(Rnd * 10)
if selectNO1=selectNO2 then goto SELECT2
Debug.Print a(selectNO2)
SELECT3:
selectNO3 = Int(Rnd * 10)
if selectNO3=selectNO1 or selectNO3=selectNO2 then goto SELECT3
Debug.Print a(selectNO3)
晕,没看到“按一下键了”
Private Sub Form_KeyPress(KeyAscii As Integer)
Dim a(), i As Integer
a = Array(12, 32, 23, 43, 354, 232, 433, 3534, 523, 5555)
Randomize
i = Int(Rnd * 10)
Debug.Print a(i)
i = Int(Rnd * 10)
Debug.Print a(i)
i = Int(Rnd * 10)
Debug.Print a(i)