***************************************************************
配列の次元数を返す
***************************************************************
Public Function fArray_DimCount(DataAry As Variant) As Long
'+ 配列の次元数を取得
Dim AryLen As Long
Dim CntDim As Long
On Error GoTo Terminate
For CntDim = 1 To 100
AryLen = UBound(DataAry, CntDim) - LBound(DataAry, CntDim) + 1
If AryLen = 0 Then Exit For
Next
Terminate:
fArray_DimCount = CntDim - 1
End Function