Tuesday, November 13, 2007

Check empty array Trick

The old trick for checking for an empty array is

Dim X() As String

If (Not X) = -1 Then
Debug.Print "empty"
Else
Debug.Print "UBound is " & UBound(X)
End If
Post a Comment