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?
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?