J
J_J
Hi,
Working with WinXP+Office2K...
The below code gives a "function not defined" error.
In fact my intention is not to only put A1:A10 data from Sheet2 to A1:J1 row
in Sheet1, but to copy the all 3 columns (A,B,C) to rows (1,2,3) in a 3x3
matrix form (from Sheet2 to Sheet1).
Can experts recommend alterations to the code?
'------------------
Sub read()
Dim Arr1 As Range
Dim Arr2() As Variant
Arr2 = Worksheets("sheet2").Range("A1:A10").Value
Set Arr1 = Worksheets("sheet1").Range("A1:J1")
End Sub
'----------------------
Sub transfer()
Dim i As Integer
For i = 1 To 10
Arr1(i, 1).Value = Arr2(1, i)
Next i
End Sub
Thanks
J_J
Working with WinXP+Office2K...
The below code gives a "function not defined" error.
In fact my intention is not to only put A1:A10 data from Sheet2 to A1:J1 row
in Sheet1, but to copy the all 3 columns (A,B,C) to rows (1,2,3) in a 3x3
matrix form (from Sheet2 to Sheet1).
Can experts recommend alterations to the code?
'------------------
Sub read()
Dim Arr1 As Range
Dim Arr2() As Variant
Arr2 = Worksheets("sheet2").Range("A1:A10").Value
Set Arr1 = Worksheets("sheet1").Range("A1:J1")
End Sub
'----------------------
Sub transfer()
Dim i As Integer
For i = 1 To 10
Arr1(i, 1).Value = Arr2(1, i)
Next i
End Sub
Thanks
J_J