'--- 配列が空の場合はTrueを返す関数 ---'
Public Function Is_Empty_Array(ByRef arrayTmp As Variant) As Boolean
On Error GoTo ERROR_
'UBound関数を使用してエラーが発生するかどうかを確認
If UBound(arrayTmp, 1) >= 0 Then
Is_Empty_Array = False
Else
Is_Empty_Array = True
End If
Exit Function
ERROR_:
'エラーが発生した場合
Is_Empty_Array = True
End Function
↧