WARNING: You're viewing the Rhino WIP version of this page! View the current version instead.

Is Dynamic Array Dimensioned

Demonstrates how to determine of a dynamic array has been dimensioned.


' Returns a Boolean value indicating whether an
' array has been dimensioned - determine
' whether or not the array has an upper bound.
Function IsUpperBound(ByVal arr)
  IsUpperBound = False
  If IsArray(arr) Then
    On Error Resume Next
    UBound arr
    If Err.Number = 0 Then IsUpperBound = True
  End If
End Function