rahulmcadit
New Member
- Joined
- May 5, 2015
- Messages
- 2
Hi,
I am new to the VBA and I need to copy the data from one sheet of excel and need to append the data to the another workbook of the same excel. I am trying the same but its giving me error. "vba runtime error 1004 pastespecial method of range class failed".
i am trying the below mentioned code for the same. Can you please suggest me what needs to be done to achieve the same.
Sheets("Sheet1").Select
Sheets("Sheet1").Range(sCopyRange).Select
Selection.Copy
Sheets("Sheet2").Select
Sheets("Sheet2").Range(sPasteRange).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
I am new to the VBA and I need to copy the data from one sheet of excel and need to append the data to the another workbook of the same excel. I am trying the same but its giving me error. "vba runtime error 1004 pastespecial method of range class failed".
i am trying the below mentioned code for the same. Can you please suggest me what needs to be done to achieve the same.
Sheets("Sheet1").Select
Sheets("Sheet1").Range(sCopyRange).Select
Selection.Copy
Sheets("Sheet2").Select
Sheets("Sheet2").Range(sPasteRange).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False