私は、配列が空であるかどうかをチェックする関数を持っています。今日から、ランタイムエラーが発生しています。なぜか分かりません。ここで VBAで配列が空であるかどうかをチェックする方法?
はコードです: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
配列が空の場合はどうすれば確認できますか?
http://stackoverflow.com/questions/206324/how-to-check-for-empty-array-in-vba-macro –
可能なDのために働い[vbaマクロで空の配列をチェックする方法](http://stackoverflow.com/questions/206324/how-to-check-for-empty-array-in-vba-macro) – LWC