Hi, I've looked through the postings on copy and paste and it appears that a few people have had this problem, but I can't find a solution to suit what I need ..... apologies if you are repeating an explanation I'm fairly new to this.
Many Thanks
Ali.
AIM
All I am trying to acheive is to copy data (no formulas) from one workbook into another, pasting below previously entered data (hence the variable FirstCell)
RESULT
With the code below I get "Run-time error '1004': Paste method of Worksheet class failed"
FRUSTRATION
I recorded the macro earlier today and tweeked the code to the script below and IT WORKED. Now it does not and I don't know what I've changed.
Many Thanks
Ali.
AIM
All I am trying to acheive is to copy data (no formulas) from one workbook into another, pasting below previously entered data (hence the variable FirstCell)
RESULT
With the code below I get "Run-time error '1004': Paste method of Worksheet class failed"
FRUSTRATION
I recorded the macro earlier today and tweeked the code to the script below and IT WORKED. Now it does not and I don't know what I've changed.
Code:
'Find first available row to paste new data
Worksheets("Contracts Traded").Select
[a1].Select
Selection.End(xlDown).Select
Selection.End(xlDown).Select
Selection.End(xlUp).Select
Selection.Offset(1, 0).Select
FirstCell = Selection.Address
'Activate T File (already open)
Workbooks(2).Activate
Worksheets("Summary").Select
'Copy Data
Range("A2", Range("A2").End(xlToRight).End(xlDown)).Select
Selection.Copy
ActiveWorkbook.Save
ActiveWindow.Close
'Activate T Monthly File and paste data
Workbooks(1).Activate
Sheets("Contracts Traded").Select
Range(FirstCell).Select
ActiveSheet.Paste