+ Reply to Thread
Results 1 to 5 of 5

Removing filters when closing sheet

  1. #1
    Registered User
    Join Date
    06-21-2010
    Location
    Toronto, Ontario, Canada
    MS-Off Ver
    Excel 2010
    Posts
    47

    Removing filters when closing sheet

    I have a sheet which is used by many people. I am finding that people are using the filters but not turning off the firlters when the save and close. This is causing issues for other users as they then need to try to figure out what filters are on. Is there a macro which will trun off all filters when you close the sheet/workbook?

    Thank you

    Stephen
    Last edited by stait; 07-02-2010 at 10:04 AM.

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Removing filters when closing sheet

    Something like
    Please Login or Register  to view this content.
    But they will have to have macros enabled
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Registered User
    Join Date
    06-21-2010
    Location
    Toronto, Ontario, Canada
    MS-Off Ver
    Excel 2010
    Posts
    47

    Re: Removing filters when closing sheet

    Thank you. I added this into a madule, but it does not work. Is there a special way I need to add this? Is there another command I need to add?

  4. #4
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Removing filters when closing sheet

    This is Workbook Event code, it should be added to the workbook code module:

    Copy the Excel VBA code
    Select the workbook in which you want to store the code
    Hold the Alt key, and press the F11 key, to open the Visual Basic Editor
    In the Project Explorer, find your workbook, and open the list of Microsoft Excel Objects
    Right-click on the ThisWorkbook object, and choose View Code
    Where the cursor is flashing, choose Edit | Paste

  5. #5
    Registered User
    Join Date
    06-21-2010
    Location
    Toronto, Ontario, Canada
    MS-Off Ver
    Excel 2010
    Posts
    47

    Re: Removing filters when closing sheet

    Quote Originally Posted by royUK View Post
    This is Workbook Event code, it should be added to the workbook code module:

    Copy the Excel VBA code
    Select the workbook in which you want to store the code
    Hold the Alt key, and press the F11 key, to open the Visual Basic Editor
    In the Project Explorer, find your workbook, and open the list of Microsoft Excel Objects
    Right-click on the ThisWorkbook object, and choose View Code
    Where the cursor is flashing, choose Edit | Paste
    I still cannot seem to get this to work when I close the sheet. I will find another way.

    Thank you for your help.

    Stephen

+ 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