I have a function, which checks whether the array is empty or not. Since today I'm getting an runtime error 9. I don't know why.
Here is the code:
When db table contains data, pass it to the variable => arrItems
arrItems as Variant
ArrEmpty as Boolean
With rs
If Not .EOF Then
arrItems = .GetRows
.Close
End If
End With
ArrEmpty = IsArrayEmpty(arrItems)
Private Function IsArrayEmpty(parArray As Variant) As Boolean
IsArrayEmpty = IIf(UBound(parArray) > 0, False, True) //Here is invoked the runtime error 9
End Function
How can I check if the array is empty?