Creating and Transposing Array in VBA

前端 未结 2 1182
萌比男神i
萌比男神i 2021-01-14 04:40

I\'m hoping to load values in a range to an array and transpose that array to another location (different workbook)

I am using the below forum post to get an idea of

2条回答
  •  失恋的感觉
    2021-01-14 05:40

    Similar, but using Resize and Ubound:

    Dim myarray As Variant
    myarray = Array(1, 2, 3, 4, 5)
    Sheets("sheet1").Range("A1").Resize(UBound(myarray), 1).Value = Application.Transpose(myarray)
    

提交回复
热议问题