+ Reply to Thread
Results 1 to 3 of 3

Autofilter and copy data to another worksheet behaviour

  1. #1
    Registered User
    Join Date
    03-30-2012
    Location
    swansea
    MS-Off Ver
    Excel 2003
    Posts
    8

    Autofilter and copy data to another worksheet behaviour

    Hello everyone,

    I have a workbook with a little VBA code that filters data on one sheet and copies visible data to another sheet, the criteria it uses to filter is a value from a text box on a user form.

    The code seems to run fine when I have the sheet that I am copying from selected, but when I have the destination sheet selected and run the user form it does not work.

    I have attached the workbook and the code is very simple, but can anyone please explain why it does not work when I have the destination sheet(report) selected ?

    Thanks in advance for your help.

    Matt
    Attached Files Attached Files

  2. #2
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,830

    Re: Autofilter and copy data to another worksheet behaviour

    Try:
    Public team As String, clerk As String, error As String
    Please Login or Register  to view this content.
    You have to fully qualify all the ranges with the sheet name, for example:
    Please Login or Register  to view this content.
    You were also missing the dots in
    Please Login or Register  to view this content.
    You can say "THANK YOU" for help received by clicking the Star symbol at the bottom left of the helper's post.
    Practice makes perfect. I'm very far from perfect so I'm still practising.

  3. #3
    Forum Contributor
    Join Date
    05-12-2018
    Location
    Netherlands
    MS-Off Ver
    2016
    Posts
    266

    Re: Autofilter and copy data to another worksheet behaviour

    like this:

    Please Login or Register  to view this content.

    End Sub

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. VBA AutoFilter Copy-Paste to different worksheet HELP!
    By Xyleene in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-06-2018, 02:57 PM
  2. Replies: 12
    Last Post: 06-13-2016, 12:37 PM
  3. Autofilter, Copy to New Worksheet, Highlight
    By maplehollow in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-19-2013, 04:09 AM
  4. [SOLVED] Inconsistent VBA behaviour with AutoFilter copy and paste
    By MattWilson79 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-06-2012, 01:53 PM
  5. [SOLVED] Problem copy/paste autofilter column results to another worksheet
    By agricolan in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-22-2012, 07:12 PM
  6. Replies: 1
    Last Post: 01-06-2012, 06:18 AM
  7. Copy and paste autofilter data based on multiple criteria to another worksheet
    By loneman in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-04-2012, 03:05 PM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1