?
Solved

How can I correct the runtime error 1004, in Excel 2003, did not get the error in 2000

Posted on 2004-11-04
5
Medium Priority
?
818 Views
Last Modified: 2013-12-25
I receive a run time error when using Excel 2003, I did not receive the error when I used Excel 2000. I just loaded 2003. The error is : Run time error "1004" "Paste method of worksheet class failed"
Here is some of the code:

Range("B1").Select
    Sheets("CEMENT").Select
    Selection.AutoFilter Field:=9, Criteria1:=">=8"
    Selection.AutoFilter Field:=3, Criteria1:="214"
    Columns("AK:AK").Select
    Selection.Copy
    Sheets("GRAPH DATA").Select
   
    ActiveSheet.Paste
    Range("C1").Select
    Sheets("CEMENT").Select
    Range("A5").Select
    Selection.AutoFilter Field:=3, Criteria1:="215"
    Columns("AK:AK").Select
    Application.CutCopyMode = False
    Selection.Copy
    Sheets("GRAPH DATA").Select
    ActiveSheet.Paste
    Range("D1").Select
    Sheets("CEMENT").Select
    Selection.AutoFilter Field:=3, Criteria1:="335"
    Columns("AK:AK").Select
    Application.CutCopyMode = False
    Selection.Copy
    Sheets("GRAPH DATA").Select
    ActiveSheet.Paste
    Range("E1").Select
0
Comment
Question by:entrerri
  • 2
  • 2
4 Comments
 
LVL 48

Expert Comment

by:Mikal613
ID: 12499844
which line?
0
 
LVL 48

Accepted Solution

by:
Mikal613 earned 1500 total points
ID: 12499856
0
 

Author Comment

by:entrerri
ID: 12593737
I talked with Microsoft on this one. The problem was, when copying a filtered column, Excel 2003 wanted to copy the filter as well. Excel 2000 only copied the data in the filtered column. The code "ActiveSheet.paste" will try to paste the filter and the runtime error will occur. The fix was to change the code to copy the column, then paste special, then value. Microsoft says this only happends when the record macro function is used, and that it has been reported as a bug. A fix will be out soon in on of the updates.
0
 

Author Comment

by:entrerri
ID: 12922603
please refund didn't get what i wanted
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

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

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

850 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