• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 441
  • Last Modified:

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
0
greatmanu
Asked:
greatmanu
1 Solution
 
greatmanuAuthor Commented:
the file just.xls sheets are linked to an external file
0
 
Dave BrettCommented:
Hi greatmanu,

remove this line - it stops the copy

Application.CutCopyMode = False

Cheers

Dave
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now