例如:Dim aa() As StringDim ll As Long
Dim hh As Long
Dim lo As LongPrivate Sub Command1_Click()
ReDim aa(9) As String
If aa(LBound(aa)) = "" Then
MsgBox "数组为空"
End If
ll = UBound(aa)
hh = LBound(aa)
lo = ll - hh
MsgBox "the size is " & lo
End Sub
Dim hh As Long
Dim lo As LongPrivate Sub Command1_Click()
ReDim aa(9) As String
If aa(LBound(aa)) = "" Then
MsgBox "数组为空"
End If
ll = UBound(aa)
hh = LBound(aa)
lo = ll - hh
MsgBox "the size is " & lo
End Sub
数组没有处理过设A=0
数组处理时A=1
判断这个数组有没有再次处理过
只要判断A的值就行了
.............
end if
Private Sub Command1_Click()
MsgBox IsEmptyArray(m_vntArrayTest())
End Sub
Public Function IsEmptyArray(ByRef arr As Variant) As Boolean
Dim o_vntArray As Variant
On Error Resume Next
If IsArray(arr) Then
o_vntArray = arr(LBound(arr))
IsEmptyArray = (Err.Number <> 0)
Else
IsEmptyArray = False
End If
End Function