+ Reply to Thread
Results 1 to 6 of 6

Unable to sort with protected sheet

  1. #1
    Registered User
    Join Date
    12-29-2010
    Location
    Italy
    MS-Off Ver
    Excel 2003
    Posts
    34

    Unable to sort with protected sheet

    Hello!

    I have a sheet protected and filters enabled. I use this code to enable sort and filters:
    Please Login or Register  to view this content.
    nevetherless, when I try to sort, I receive this message in excel: "The cell or chart you re trying to change is on a protected sheet.
    ro make changes, click Unprotect Sheet in the Review tab (you might need a password)."

    How I should to modify the code?
    Thanks

  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,364

    Re: Unable to sort with protected sheet

    suggest you upload a sample workbook with some typical data and instructions on how to reproduce the problem.

    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
    Registered User
    Join Date
    12-29-2010
    Location
    Italy
    MS-Off Ver
    Excel 2003
    Posts
    34

    Re: Unable to sort with protected sheet

    Thanks for your answer.

    So, I have attached a file. The password is "1" and it enter automatically by code (you can see the code in the console).

    Now, when I try to sorting A to Z (or viceversa is no matter), for example the name, the error message appears.
    Instead, I have not problem with filters.

    Thanks again.
    Attached Files Attached Files

  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,364

    Re: Unable to sort with protected sheet

    The only way that I can get it to sort when the sheet is protected is if ALL the cells are unlocked.

    This is possibly related to the fact that it is a Table and Tables seem to be sensitive to locked cells/rows/columns.

    A workaround may be to provide a button to unlock and sort the sheet. Not ideal but needs must.

    Regards, TMS

  5. #5
    Registered User
    Join Date
    12-29-2010
    Location
    Italy
    MS-Off Ver
    Excel 2003
    Posts
    34

    Re: Unable to sort with protected sheet

    Ok thank you.

  6. #6
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Unable to sort with protected sheet

    Hello milt2010,

    Would the attached sample Workbook work for you?

    Regards
    Attached Files Attached Files
    Please consider:

    Be polite. Thank those who have helped you. Then Click on the star icon in the lower left part of the contributor's post and add Reputation. Cleaning up when you're done. If you are satisfied with the help you have received, then Please do Mark your thread [SOLVED] .

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 5
    Last Post: 06-20-2014, 02:12 PM
  2. [SOLVED] Sort Functions are Disabled When Sheet is Protected, and more Issue When Sheet is Shared
    By bssol in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-27-2013, 05:33 AM
  3. Unable to use Group/Outline in a protected sheet?
    By ynot2010 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 03-03-2012, 02:27 AM
  4. Sort on a protected sheet
    By mac in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-27-2005, 02:06 PM
  5. Unable to open excel sheet in Protected mode from VB 6.0
    By ourspt in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-26-2005, 06:59 AM

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