VB中如何在类模块和主程序间传递数组
2005-01-19 16:09 htc开发 阅读(389) 评论(0) 编辑 收藏 举报'做参数时不要指定大小.
'在类中如下定义
Public Sub Run(resultcir() As Single)
MsgBox UBound(resultcir)
resultcir(2) = 12345
End Sub
'窗口中这样用:
Private Sub Command1_Click()
Dim a(9) As Single
Dim aa As New Class1
aa.Run a()
MsgBox a(2)
End Sub