***************************************************************
配列の要素の下限・上限を、ByRef で返す関数。
主には配列系の関数用に使用。
***************************************************************
Public Function fArray_Lbound_Ubound(DataAry As Variant, _
Optional ByRef Row_L As Long, Optional ByRef Row_U As Long, _
Optional ByRef Col_L As Long, Optional ByRef Col_U As Long)
'初期化
Row_L = 0
Row_U = -1
Col_L = 0
Col_U = -1
Dim CntDim As Long
CntDim = fArray_DimCount(DataAry)
Select Case CntDim
Case 1
Row_L = LBound(DataAry, 1)
Row_U = UBound(DataAry, 1)
Case 2
Row_L = LBound(DataAry, 1)
Row_U = UBound(DataAry, 1)
Col_L = LBound(DataAry, 2)
Col_U = UBound(DataAry, 2)
End Select
End Function