VB编程:巧用常量定义数组-37_彭世瑜_新浪博客

运行效果:


VB编程:巧用常量定义数组-37_彭世瑜_新浪博客


程序代码:

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


上一篇:VB编程:利用控件数组设置控件状态


下一篇:VB编程:申明窗体数组