LoginSignup
1
1

More than 3 years have passed since last update.

VBA 二次元配列の一次元(行数)を増減させる関数

Last updated at Posted at 2021-04-10

VBAの二次元配列で、一次元目を変更させる関数を作りました。

Function chgVarRows(vBuf As Variant, Optional cnt As Long = 1) As Variant

    vBuf = WorksheetFunction.Transpose(vBuf)
    ReDim Preserve vBuf(1 To UBound(vBuf, 1), 1 To UBound(vBuf, 2) + cnt)
    chgVarRows = WorksheetFunction.Transpose(vBuf)

End Function
1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1