Solved

excel macro error

Posted on 2004-04-02
2
430 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
Comment Utility
the file just.xls sheets are linked to an external file
0
 
LVL 50

Accepted Solution

by:
Dave Brett earned 125 total points
Comment Utility
Hi greatmanu,

remove this line - it stops the copy

Application.CutCopyMode = False

Cheers

Dave
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

762 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now