VB 无重复随即数 编译错误 请教~
代码:
Private Sub Command1_Click()
For Y = 1 To 9
m(Y) = 0
Next
For X = 0 To 8
Do
Randomize
i = Int(9 * Rnd())
Loop While m(i) = 1
Set m(i) = 1
n(X) = i
Next
Text1.Text = n(0) & n(1) & n(2) & n(3) & n(4) & n(5) & n(6) & n(7) & n(8)
End Sub
Private Sub Form_Load()
Dim i As Integer
Dim n(0 To 8) As Integer '无重复的随机数组
Dim m(1 To 9) As Integer '标志
Dim X, Y As Integer
End Sub
编译总是报错 说函数未定义! 郁闷```