Hi guys, I have this code running but when it comes to pasting in B2 I keep getting an error: 348
I just need to copy the cells in columns from A2 to C2 then down to the last empty row and paste into V2 file in B2
Must be a way, someone else made this but cannot work out the copy part as it wants to copy past B2?
Thanks
I just need to copy the cells in columns from A2 to C2 then down to the last empty row and paste into V2 file in B2
Code:
Sub Copy()
Dim x As Workbook
Dim y As Workbook
Set x = Workbooks.Open("O:\Public\Ads\1\V2.xlsm")
'Copies Product info:
lastCol = ActiveSheet.Range("A2").End(xlToRight).Column
lastRow = ActiveSheet.Cells(65536, lastCol).End(xlUp).Row
ActiveSheet.Range("A2", ActiveSheet.Cells(lastRow, lastCol)).Copy
'Now, paste to y worksheet:
Workbooks("V2.xlsm").Worksheets("Input").Range ("B2")
End Sub
Must be a way, someone else made this but cannot work out the copy part as it wants to copy past B2?
Thanks
Last edited: