Option Explicit 'Option Base 1 '默认下标改为从1开始 Private Sub DataOutput(arrRef() As Double) Dim i& For i = LBound(arrRef) To UBound(arrRef) Debug.Print arrRef(i) Next End Sub Private Sub Command1_Click() Dim aTmp(999) As Double 'VB默认下标从0开始 '如果使用了Option Base 1,就要把999改为1000 Dim i&, d# d = 0 '这句可以不要 For i = 0 To 999 '数组赋值 aTmp(i) = d d = d + 0.03 Next For i = 0 To 999 '本地使用数组成员 Debug.Print i, aTmp(i) Next '把数组传递到其它过程用使用: DataOutput aTmp '这儿就用数组名 End Sub