vb中计算任意一位数组元素个数的公式是

vb中计算任意一位数组元素个数的公式是
2025-04-08 15:47:52
推荐回答(2个)
回答1:

对于一维数组a
元素个数为 UBound(a)-LBound(a)+1

回答2:

例如:
Private Sub Command1_Click()
Dim a(5) As Integer
Debug.Print LBound(a), UBound(a)
End Sub