j為空時怎么給它一個值?
arr(i,j)是一個二維的數組,i,j應該具有相應的值,相當于一個i行j列的區域,要想復制就直接用賦值運算符等于號“=”復制就行了,例如arr(2,3)=array(1,2,3,4,5,6)
也可以使用for循環挨個賦值
Sub t1()
Dim i As Integer, j As Integer
Dim arr(1 To 2, 1 To 3)
For i = 1 To 2
For j = 1 To 3
arr(i, j) = Cells(i, j)
Next j
Next i
End Sub