forginganewone
Board Regular
- Joined
- Mar 14, 2018
- Messages
- 64
I keep getting this error "runtime error 1004 pastespecial method of range class failed" on following code :
Option Explicit
Sub copypasterow()
'
' chequerecieving Macro
' copy active row to another workbooks last row
'
' Keyboard Shortcut: Ctrl+l
'
Dim wbTarget As Workbook
Selection.EntireRow.Copy
Set wbTarget = Workbooks.Open("D:\Office\Rental Cheques\Recieving\Recieving File 1\Recieving file 1.xlsx")
wbTarget.Sheets("Sheet1").Range("C1").End(xlDown).Offset(1, 0).PasteSpecial
Application.CutCopyMode = False
End Sub
Please help
Option Explicit
Sub copypasterow()
'
' chequerecieving Macro
' copy active row to another workbooks last row
'
' Keyboard Shortcut: Ctrl+l
'
Dim wbTarget As Workbook
Selection.EntireRow.Copy
Set wbTarget = Workbooks.Open("D:\Office\Rental Cheques\Recieving\Recieving File 1\Recieving file 1.xlsx")
wbTarget.Sheets("Sheet1").Range("C1").End(xlDown).Offset(1, 0).PasteSpecial
Application.CutCopyMode = False
End Sub
Please help