TomNR
Member
Hi all,
I am trying to get two pieces of data from one Workbook and paste it into another Workbook but in a specific cell.
I am pretty new to VBA so am using ActiveCell currently. However, the problem is I am copying over two values and so it just over writes one another.
So my question is, how can I get the data to be pasted into Row 2 but it columns B & C and then next time I hit the macro it goes to Row 3 and column B & C.
The code I have so far is:
I am trying to get two pieces of data from one Workbook and paste it into another Workbook but in a specific cell.
I am pretty new to VBA so am using ActiveCell currently. However, the problem is I am copying over two values and so it just over writes one another.
So my question is, how can I get the data to be pasted into Row 2 but it columns B & C and then next time I hit the macro it goes to Row 3 and column B & C.
The code I have so far is:
Code:
Sub kcl3()
Const book2Name = "paper.xls"
' declarations
Dim book1 As Workbook
Dim book2 As Workbook
' start
Set book1 = ThisWorkbook
Set book2 = Workbooks.Open(Environ("USERPROFILE") & "\Desktop\paper.xls")
book2.Sheets("1 - Project on a page").Range("N22:N27").Copy
book1.Sheets("October 15").Activate
ActiveCell.PasteSpecial xlPasteValues
book2.Sheets("1 - Project on a page").Range("N34:N39").Copy
book1.Sheets("October 15").Activate
ActiveCell.PasteSpecial xlPasteValues
End Sub
