我有一个特定的数组整数
Dim ArrayWinRandomNumber(0 To 5) As Integer
和另一个功能
Private Sub repetido()
For x = 0 To 5
Randomize()
Dim RandomNumber As Integer
RandomNumber = CInt(Int((49 * Rnd()) + 1))
For y = 0 To 5
If RandomNumber = ArrayWinRandomNumber(y) Then
repetido()
End If
Next
ArrayWinRandomNumber(x) = RandomNumber
Next x
ordenar()
End Sub
问题是,他第一次打电话重复,它工作正常,但如果你第二次打回来。我回来了IndexOutOfRangeException