+ Reply to Thread
Results 1 to 5 of 5

Remove Filters on close

  1. #1
    Registered User
    Join Date
    11-18-2008
    Location
    USA
    Posts
    54

    Remove Filters on close

    Hello all,

    I have a slight problem. I have an excel that is uploaded on Share Point and my problem is when someone uses it they are filtering it and when they are done they are saving it with the filters. So the next time someone opens the file they are seeing the person's filters that were previously on.

    What I was wondering was if there was a way that I could set up excel to remove the filters when it closes? I would like to do this without using a macro, but if that is the absolute only way then could someone help me write it?

    Thank you!

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Remove Filters on close

    This macro placed in the ThisWorkbook module will execute on close.
    Please Login or Register  to view this content.

    You could put that into a _BeforeSave() event instead. Or you could edit it to only refer to the one specific sheet.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    11-18-2008
    Location
    USA
    Posts
    54

    Re: Remove Filters on close

    Awesome I figured there was a simple macros to solve this problem, but is there anyway to do it without a Macro, so that everyone doesn't have to enable macros?

  4. #4
    Registered User
    Join Date
    11-18-2008
    Location
    USA
    Posts
    54

    Re: Remove Filters on close

    I tried the code you gave, and I get:

    Compile Error:

    Procedure declaration does not match description of event or procedure having the same name.

  5. #5
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Remove Filters on close

    Sorry, forgot to look at a standard event sample for any required parameters. Try this:

    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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