运行效果:​​​

程序代码:

Private Const general = 5

Private Sub Command1_Click()

   Dim myarray(general - 1) As Integer

   For i = 0 To general - 1

       myarray(i) = Int(Rnd * 90) + 5

       Print myarray(i)

   Next i

End Sub