+ Reply to Thread
Results 1 to 4 of 4

Macro to turn off autofilter when exiting sheet not working

  1. #1
    Forum Contributor
    Join Date
    03-08-2011
    Location
    Lubbock, TX, USA
    MS-Off Ver
    MS OFFICE 365 EXCEL, OUTLOOK, WORD, POWERPOINT
    Posts
    194

    Macro to turn off autofilter when exiting sheet not working

    Hi there. I'm thinking this isn't working because it only applies to an active worksheet. But, I want to confirm that and ask for ideas. I am not great at VBA but I can follow along and look up anything I don't readily understand.

    I have a worksheet that needs autofilters on while in the sheet updating things. But, it is critical the user remember to turn the autofilters off before switching to a different tab. If they are left filtered, the filtered data won't update when other processes try to.

    Here is what I came up with. It doesn't work. I'm thinking that since it specifies activesheet it can't reach back to the sheet as I leave it?

    Edit: In the VBA EXPLORER this code is not in a module but on the appropriate sheet.

    Please Login or Register  to view this content.
    As always I really appreciate the time you guys take to help us. Thanks.

  2. #2
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,079

    Re: Macro to turn off autofilter when exiting sheet not working

    How about
    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    03-08-2011
    Location
    Lubbock, TX, USA
    MS-Off Ver
    MS OFFICE 365 EXCEL, OUTLOOK, WORD, POWERPOINT
    Posts
    194

    Re: Macro to turn off autofilter when exiting sheet not working

    Quote Originally Posted by Fluff13 View Post
    How about
    Please Login or Register  to view this content.
    score! THAT did the trick. Thank you, thank you, thank you.

  4. #4
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,079

    Re: Macro to turn off autofilter when exiting sheet not working

    You're welcome & thanks for the feedback.

+ 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 not working on specific sheet.
    By NewYears1978 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-08-2020, 03:58 PM
  2. update autofilter not working in protected sheet
    By tlacloche in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-30-2014, 03:03 PM
  3. Replies: 1
    Last Post: 07-25-2014, 08:51 AM
  4. Code for Exiting not working
    By fbiasi in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-27-2014, 08:29 PM
  5. Call Function to Turn On Autofilter Not Working
    By rmoreno in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-01-2013, 01:07 PM
  6. in vba how to turn off autofilter also how to check if autofilter is on
    By welchs101 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 05-31-2011, 10:04 AM
  7. Replies: 1
    Last Post: 01-31-2006, 12:30 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