> arrays that are not Empty but contain zero elements
What is an array that is not empty but contains zero elements?
What is an array that is not empty but contains zero elements?
Here's an example:
' x can be anything, including an array, but
' defaults to the value Empty.
Dim x
' y is an array of values that can be anything,
' which defaults to an empty array.
Dim y()
' Initialize x as an empty array
x = Array()
' The following two statements print 0 and -1.
Debug.Print LBound(x)
Debug.Print UBound(x)
' The following two statements error with
' "Subscript out of range" even though y
' is also a kind of empty array.
Debug.Print LBound(y)
Debug.Print UBound(y)