Solved

excel macro error

Posted on 2004-04-02
2
434 Views
Last Modified: 2012-08-14
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
Comment
Question by:greatmanu
2 Comments
 

Author Comment

by:greatmanu
ID: 10739873
the file just.xls sheets are linked to an external file
0
 
LVL 50

Accepted Solution

by:
Dave Brett earned 125 total points
ID: 10740019
Hi greatmanu,

remove this line - it stops the copy

Application.CutCopyMode = False

Cheers

Dave
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question