+ Reply to Thread
Results 1 to 2 of 2

Filter with protected sheets/buttons

Hybrid View

  1. #1
    Registered User
    Join Date
    01-19-2008
    MS-Off Ver
    Excel for M365 MSO
    Posts
    44

    Filter with protected sheets/buttons

    Hello,

    I have a spreadsheet that contains multiple rows where I want to filter on Column "A". However, I want to do a couple of things.

    First, I want to be able to filter even though I have the spreadsheet protected.

    Secondly, I don't the auto filter to show. I want to be able to use a button that I create to turn the filter on/off.

    Is this possible, and if so how?

    Thanks,

    - J

  2. #2
    Forum Expert Palmetto's Avatar
    Join Date
    04-04-2007
    Location
    South Eastern, USA
    MS-Off Ver
    XP, 2007, 2010
    Posts
    3,978

    Re: Filter with protected sheets/buttons

    First, I want to be able to filter even though I have the spreadsheet protected.
    First - it would be nice if you completed your profile to indicate which version of Excel you are using.

    Allow AutoFilters is a protection setting since version 2000. So, protect the sheet and use the setting.

    Macros can run on a protected Sheet with the UserInterFaceOnly argument used with the Protect Method, no need to Unprotect.
    Example:
    ActiveSheet. Protect  Password:="Secret", DrawingObjects:=True, _ 
    Contents:=True, Scenarios:=True, AllowFiltering:=True, _ 
    userinterfaceonly:=True
    Secondly, I don't the auto filter to show. I want to be able to use a button that I create to turn the filter on/off.
    You only need to record two macros and assign them to a checkbox or buttons. Record the first macro turning on and applying the filter criteria and the second macro turning filters off. Try the macro record, post a sample workbook and provide more details if you need more help.
    Palmetto

    Do you know . . . ?

    You can leave feedback and add to the reputation of all who contributed a helpful response to your solution by clicking the star icon located at the left in one of their post in this thread.

+ 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