ActiveSheet.Paste error in Excel 2003

  • Thread starter Thread starter Oren
  • Start date Start date
O

Oren

This code worked perfectly fine on Excel XP, but after
upgrading to Excel 2003 - I got an error (Paste method of
range class failed). When I check out the sheet, it
really does the paste job, but for some reason the error
pops up and stops the macro. Does anyone have a clue?

....
Sheets("All").Select
Selection.AutoFilter Field:=1
Selection.AutoFilter Field:=3
Selection.AutoFilter Field:=1, Criteria1:=section
Range("A1").Select
Range(Selection, ActiveCell.SpecialCells
(xlLastCell)).Select
Selection.Copy
Sheets(section).Select
Range("A1").Select
ActiveSheet.Paste <-------------- Error here!!!
Range("A3").Select
....
 
No idea, Oren, the code works fine for me in Excel 2003. Sorry.

--
Jim Rech
Excel MVP
| This code worked perfectly fine on Excel XP, but after
| upgrading to Excel 2003 - I got an error (Paste method of
| range class failed). When I check out the sheet, it
| really does the paste job, but for some reason the error
| pops up and stops the macro. Does anyone have a clue?
|
| ...
| Sheets("All").Select
| Selection.AutoFilter Field:=1
| Selection.AutoFilter Field:=3
| Selection.AutoFilter Field:=1, Criteria1:=section
| Range("A1").Select
| Range(Selection, ActiveCell.SpecialCells
| (xlLastCell)).Select
| Selection.Copy
| Sheets(section).Select
| Range("A1").Select
| ActiveSheet.Paste <-------------- Error here!!!
| Range("A3").Select
| ...
 
try

Sheets(section).Range("A1").PasteSpecial xlAllValues

note that there's reall no need to actiavate & select to copy data
 
First, thanks guys for the responses - I really appreciate it
I tried the code line you suggested, Patrik, but I get the same error (just "SpecialPaste method failed" instead of "Paste Method failed"). Can you think maybe what can cause an error that will prevent a paste to function
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Different Results from the Same Macro 2
Macro1 2
Help me4 2
AutoFilter Criteria in VBA 5
replace copy and paste 2
=today() - 1 4
Error Handle problem 4
ACTIVESHEET.PASTE not working. 3

Back
Top