+ Reply to Thread
Results 1 to 4 of 4

Grouping AND Autofiltering on a protected sheet - it just won't stay fixed!

  1. #1
    Registered User
    Join Date
    05-08-2012
    Location
    Sunshine Coast, Australia
    MS-Off Ver
    Excel 2010
    Posts
    3

    Grouping AND Autofiltering on a protected sheet - it just won't stay fixed!

    I have a rather complicated (for me) excel file that I need to protect, but also need to enable filtering and grouping.

    I am not at all competent with VBA and all I have discovered so far has been gleaned from the 'net. I have had help from various sources trying to sort this out, but nothing stays fixed.

    I am using the following code;
    Please Login or Register  to view this content.
    It all works wonderfully until I close the file and try to re-open it. The grouping function remains, but the filtering stops working.

    When I'm protecting the sheet, I make sure I tick 'Sort' and 'Use AutoFilter'.

    But, everytime I re-open the file, Autofiltering is disabled. When I check in VBA, in the properties column I noticed that that EnableAutoFilter shows 'False'. I change this to 'True' and it works fine again.... until I shut it down and try to re-open it - and it's showing 'False' again.

    I've attached the file to this post - the password to unprotect the sheet is 'mgs' and only the first two tabs require grouping and filtering.

    Thanks in advance.

    Muz
    Attached Files Attached Files
    Last edited by muzzanoosa; 05-09-2012 at 07:11 PM. Reason: attach file

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,167

    Re: Grouping AND Autofiltering on a protected sheet - it just won't stay fixed!

    Not everyone is able to download from the link that you have provided. Please attach the sample excel file directly to your thread.

    To Attach a File:

    1. Click on Go Advanced.
    2. In the frame Attach Files you will see the button Manage Attachments
    3. Click the button.
    4. A new window will open titled Manage Attachments - Excel Forum.
    5. Click the Browse... button to locate your file for uploading.
    6. This will open a new window File Upload.
    7. Once you have located the file to upload click the Open button. This window will close.
    8. You are now back in the Manage Attachments - Excel Forum window.
    9. Click the Upload button and wait until the file has uploaded.
    10. Close the window and then click Submit.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  3. #3
    Registered User
    Join Date
    05-08-2012
    Location
    Sunshine Coast, Australia
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Grouping AND Autofiltering on a protected sheet - it just won't stay fixed!

    Is 'bumping' allowed?

  4. #4
    Registered User
    Join Date
    05-08-2012
    Location
    Sunshine Coast, Australia
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Grouping AND Autofiltering on a protected sheet - it just won't stay fixed!

    Ok, I've sorted it out! (Only took me 8 months)

    The code was correct all along, but I only added 'AllowFiltering:=True' to the Sheet 1 code. Once I added it to 'ThisWorkbook' it started working.

    Yoohoo!!!

    Newbie mistake?

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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