Private Sub Form_click()得到一组随机变量,怎样用到Private Sub Command1_Click()中去啊

来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/23 05:54:43
PrivateSubForm_click()得到一组随机变量,怎样用到PrivateSubCommand1_Click()中去啊PrivateSubForm_click()得到一组随机变量,怎样用到P

Private Sub Form_click()得到一组随机变量,怎样用到Private Sub Command1_Click()中去啊
Private Sub Form_click()得到一组随机变量,怎样用到Private Sub Command1_Click()中去啊

Private Sub Form_click()得到一组随机变量,怎样用到Private Sub Command1_Click()中去啊
用数组像这样:Dim a(1 To 10) Private Sub Command1_Click() For i = 1 To 10 Print a(i) Next i End Sub Private Sub Form_Click() Randomize For i = 1 To 10 a(i) = Int(Rnd * 100) Next i End Sub