你列举的那三个函数是不能区分动态数组和普通已赋值数组的区别的,写个函数吧,
Function IsInitialized(a)
Err.Clear
On Error Resume Next
UBound(a)
If (Err.Number = 0) Then
IsInitialized = True
End If
End Function
使用方法如下
Dim myArray()
If Not IsInitialized(myarray) Then
msgbox "Uninitialized"
End If