+ Reply to Thread
Results 1 to 10 of 10

How to use advanced filter function in a protective mode

  1. #1
    Forum Contributor
    Join Date
    12-14-2012
    Location
    Perth
    MS-Off Ver
    Excel 2010
    Posts
    208

    How to use advanced filter function in a protective mode

    Hi guys,

    I have actually posted the same thread (enquiry) few weeks back but wasn't resolved until now and seems like no one's looking at the thread any more.

    So, I am putting the thread here again. And If this is againt the forum regulation, please let me know then I will put this thread down.

    Below is the code I have used on my worksheet to enable advanced filter button in a protective worksheet mode but I get an error.

    Can anyone help please?

    Cheers,

    Please Login or Register  to view this content.

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,941

    Re: How to use advanced filter function in a protective mode

    My way, as outlined in the previous thread, would be:

    Please Login or Register  to view this content.

    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Forum Contributor
    Join Date
    12-14-2012
    Location
    Perth
    MS-Off Ver
    Excel 2010
    Posts
    208

    Re: How to use advanced filter function in a protective mode

    Hi TMShucks,

    I still get the same error message from excel as below:

    Run-time error ‘1004’:
    You cannot use this command on a protected sheet. To use this command, you must first unprotect the sheet (Review tab, Changes group, Unprotect Sheet button). You may be prompted for a password.

    I am using a button to activate the code (code is assigned to the button). Any idea why?

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,941

    Re: How to use advanced filter function in a protective mode

    Which sheet is protected?

    Maybe post a sample workbook so we can see the data, structure and code.

    Regards, TMS

  5. #5
    Forum Contributor
    Join Date
    12-14-2012
    Location
    Perth
    MS-Off Ver
    Excel 2010
    Posts
    208

    Re: How to use advanced filter function in a protective mode

    Hi TMShucks,

    Please see the attached sample excle file below. hope this will help you understanding the issue I am facing at the moment. Thanks.
    Attached Files Attached Files

  6. #6
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,941

    Re: How to use advanced filter function in a protective mode

    Please see the attached updated example.


    The main problem was that both sheets were protected.

    I've moved the code for the buttons to a standard module, which is where I think they belong. That said, it's not a big deal - it's code relating to buttons on the sheet.


    I've also amended one of the Worksheet Change events to disable and re-enable event handling as you are making changes to the sheet where the event code operates.


    Seems to be working now.


    Regards, TMS
    Last edited by TMS; 01-21-2013 at 09:37 AM.

  7. #7
    Forum Contributor
    Join Date
    12-14-2012
    Location
    Perth
    MS-Off Ver
    Excel 2010
    Posts
    208

    Re: How to use advanced filter function in a protective mode

    Hi TMShucks,

    I've had a look at your excel file attached above and seems like none of the buttons in the workbook is working.

    can you please check if that's the one you meant to upload?

    Many thanks.

  8. #8
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,941

    Re: How to use advanced filter function in a protective mode

    No, it works just fine. I've just clicked on my attachment rather than loading it from my hard disk. No problem.

    Perth Sheet1 >> Sheet 2, starting with B
    Electronic Sheet1 >> Sheet 2, starting with A
    All Sheet1 >> Sheet 2, all records (*)

    Probably a stupid question: have you enabled macros?


    Regards, TMS

  9. #9
    Forum Contributor
    Join Date
    12-14-2012
    Location
    Perth
    MS-Off Ver
    Excel 2010
    Posts
    208

    Re: How to use advanced filter function in a protective mode

    Yes it does work. Sorry and Thank you for your help TMShucks Appreciated!!!!

  10. #10
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,941

    Re: How to use advanced filter function in a protective mode

    You're welcome. Thanks for the rep.

+ 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