***************************************************************
配列の長さを取得する
【引数】DataAry :データ配列
Dimension :1次元or2次元の指定(1次元=xlRows, 2次元=xlColmuns)
***************************************************************
Public Function fArray_Length(DataAry As Variant, Optional Dimension As XlRowCol = XlRowCol.xlRows) As Long
On Error Resume Next
fArray_Length = UBound(DataAry, Dimension) - LBound(DataAry, Dimension) + 1
On Error GoTo 0
End Function