'*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-
'★2次元配列の1次元目の要素数を増やす
'*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-
Public Function zfRedimPreserveArray(ByVal arr As Variant, ByVal rowNum As Long)
Dim tempArr() As Variant
tempArr = WorksheetFunction.Transpose(arr)
ReDim Preserve tempArr(UBound(tempArr, 1), rowNum)
zfRedimPreserveArray = WorksheetFunction.Transpose(tempArr)
End Function
コメント