View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.programming
JJUK JJUK is offline
external usenet poster
 
Posts: 1
Default XL2003 "paste method of worksheet class failed"

It's good to know I'm not the only one with this very same problem. My code
worked in excel 2002. The same solution with a manual code stop works for me
too. Let's hope microsoft sorts this out soon or I will have to reinstall
the older version.

"Peter T" wrote:

Hi Dave,

If you stop your code after the line
Selection.copy
can you complete the operation manually.

Regards,
Peter

-----Original Message-----

After another look at this problem - I have found that

the paste
operation has been completed successfully (and the data

is still in the
clipboard) then I get the error message.

Just in case the problem was the next line of code - I

inserted a
msgbox line but the error occurred before it got to it.

I will attach the code - it basically runs an autofilter

on a sheet
called 'Data' and then copies and pastes the filtered

dataset to the
'Air' sheet.

Sheets("Data").Select
Selection.AutoFilter Field:=16, Criteria1:="A"

ActiveSheet.Range("A1").Select
ActiveCell.CurrentRegion.Rows.Select
Selection.copy

Sheets("Air").Select
ActiveSheet.Range("A1").Select
ActiveSheet.Paste '<----

Fails at
this point

Application.CutCopyMode = False


Thanks

Dave


--
dave_d
----------------------------------------------------------

--------------
dave_d's Profile: http://www.excelforum.com/member.php?

action=getinfo&userid=14608
View this thread:

http://www.excelforum.com/showthread...hreadid=262200

.