如何从array1(I,1)复制到array1(J,1)-同一阵列VBA

时间:2019-06-26 07:01:26

标签: arrays excel vba

我试图将array1中的元素复制并粘贴到同一数组中。

Dim array1 As Range  'the range I had assign the column range into it    
Dim remarkrange As Range 'the range I had assign the column range into it    

For I = LBound(remarkrange) To UBound(remarkrange)
    For J = LBound(remarkrange) To UBound(remarkrange)
        Range("A" & I & ":AD" & I).Copy Range("A" & J & ":AD" & J)
    Next J
Next I

假设我将array1更改为Dim array1() As variant,我该如何制作与上面用作复制功能的数组相同的复制功能?我可以知道解决问题的方法吗,谢谢

0 个答案:

没有答案