vba 如何将数组作为参数
2个回答
推荐于2017-09-29
展开全部
Option Explicit
Type test
a(10) As String
End Type
Sub test()
Dim c As test
Dim i As Integer
For i = 0 To 10
c.a(i) = i ^ 2
Next
Call F1(c)
End Sub
Function F1(b As test)
Dim i As Integer
For i = 0 To UBound(b.a)
Debug.Print b.a(i)
Next。
Type test
a(10) As String
End Type
Sub test()
Dim c As test
Dim i As Integer
For i = 0 To 10
c.a(i) = i ^ 2
Next
Call F1(c)
End Sub
Function F1(b As test)
Dim i As Integer
For i = 0 To UBound(b.a)
Debug.Print b.a(i)
Next。
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
Option Explicit
Type test
a(10) As String
End Type
Sub test()
Dim c As test
Dim i As Integer
For i = 0 To 10
c.a(i) = i ^ 2
Next
Call F1(c)
End Sub
Function F1(b As test)
Dim i As Integer
For i = 0 To UBound(b.a)
Debug.Print b.a(i)
Next
End Function
这样算不算
Type test
a(10) As String
End Type
Sub test()
Dim c As test
Dim i As Integer
For i = 0 To 10
c.a(i) = i ^ 2
Next
Call F1(c)
End Sub
Function F1(b As test)
Dim i As Integer
For i = 0 To UBound(b.a)
Debug.Print b.a(i)
Next
End Function
这样算不算
本回答被提问者和网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询