PDA

View Full Version : Solved: how to autofilter then to paste



helai
04-28-2006, 04:45 AM
I want to past some contents from one sheet to another sheet
the code like bellow:

Worksheets("sheet1").Activate
lastrow = ActiveSheet.Range("A65536").End(xlUp).Row
Selection.AutoFilter Field:=3, Criteria1:="=123", Operator:=xlOr, _
Criteria2:="=456"
Range("a" & lastrow).SpecialCells(xlCellTypeVisible).Copy
Worksheets("errlist").Select
Sheets("errlist").Paste Destination:=Worksheets("errlist").Range("a1")

but it prompt a error message,just like say
worksheet 's paste function is failure

even I use activesheet.past is also wrong
winxp+office2003

how to solve it?

Bob Phillips
04-28-2006, 06:18 AM
Cross-posted at JMT (http://www.puremis.net/excel/cgi-bin/yabb/YaBB.pl?board=generaly2rc3)

helai, please read this message to cross-posters (http://www.excelguru.ca/XLKBA/XLKBA05.htm)