Consulting

Results 1 to 2 of 2

Thread: Solved: how to autofilter then to paste

  1. #1
    VBAX Regular
    Joined
    Aug 2005
    Posts
    10
    Location

    Solved: how to autofilter then to paste

    I want to past some contents from one sheet to another sheet
    the code like bellow:
    [vba]
    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")
    [/vba]
    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?

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Cross-posted at JMT

    helai, please read this message to cross-posters

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •