excel macro error

I geta error 1004,pastespecial method of range class failed
Test.xls is already open.Here is the code


Workbooks.Open "D:\Games\just.xls"
Sheets("KR").Select
Cells.Select
Selection.Copy
Application.CutCopyMode = False
Workbooks("test.xls").Activate
Sheets("Sheet1").Select

Excel.Range("A1").PasteSpecial xlPasteValues

What could be the problem.I get the error messageat the last line
greatmanuAsked:
Who is Participating?
 
DaveConnect With a Mentor Commented:
Hi greatmanu,

remove this line - it stops the copy

Application.CutCopyMode = False

Cheers

Dave
0
 
greatmanuAuthor Commented:
the file just.xls sheets are linked to an external file
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.