+ Reply to Thread
Results 1 to 4 of 4

Problem: Possible to delete locked cells in protected Sheets

  1. #1
    Registered User
    Join Date
    09-07-2016
    Location
    Europe
    MS-Off Ver
    2010
    Posts
    9

    Problem: Possible to delete locked cells in protected Sheets

    Hi Everyone,

    I have been trying to solve this for quite a while but I do not seem to find the solution. I have a macro to protect all Sheets in a workbook in Excel 2010. Below the code:
    Please Login or Register  to view this content.
    When I try to edit/delete the content of 1 cell Excel says that it is protected. However, when I select more than 1 cell (including locked cells) I can delete the content!! (FYI: I need the user to be able to select locked cells in a protected workbook).

    Any idea why this is happening?

    Thank you very much in advance!

    Best,
    Daniel

  2. #2
    Forum Expert
    Join Date
    06-25-2009
    Location
    Sofia, Bulgaria, EU
    MS-Off Ver
    Excel 2003-2013
    Posts
    1,290

    Re: Problem: Possible to delete locked cells in protected Sheets

    can you upload workbook that replicates the problem?
    If you are pleased with a member's answer then use the Star icon to rate it.

  3. #3
    Registered User
    Join Date
    09-07-2016
    Location
    Europe
    MS-Off Ver
    2010
    Posts
    9

    Re: Problem: Possible to delete locked cells in protected Sheets

    Hi Community,

    First of all, thank you for the response. I have been trying to solve it during the weekend and I finally found the problem.

    I had a Worksheet_SelectionChange event to unhide/hide a number of rows when the user selects 2 specific cells. At the beginning of the macro I unprotected the sheet and then protect it at the end of the macro.

    The problem was that when the user selected 2 or more cells but not the target ones, the event started un-protecting the sheet. Here is the fix:

    Code:

    Please Login or Register  to view this content.
    Just in case someone needs it.

    Cheers,
    Daniel

  4. #4
    Forum Expert
    Join Date
    06-25-2009
    Location
    Sofia, Bulgaria, EU
    MS-Off Ver
    Excel 2003-2013
    Posts
    1,290

    Re: Problem: Possible to delete locked cells in protected Sheets

    Thanks for posting back with explanation of the problem and your solution

+ 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. Still able to change cells that are locked & protected?
    By BJ_Norge in forum Excel General
    Replies: 11
    Last Post: 01-23-2022, 09:21 PM
  2. [SOLVED] VBA to allow users to delete specific rows with locked cells on protected sheets
    By JT12345 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 01-13-2015, 02:46 PM
  3. [SOLVED] Strange Occurence - able to delete locked cells on protected sheet - is this a known bug
    By tv69 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-29-2014, 03:32 PM
  4. Automatically Delete Unused Sheets in Protected Wkbk with Protected Sheets?
    By leaning in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 07-06-2010, 08:49 PM
  5. moving around when sheets are locked (protected)
    By AmyJo in forum Excel General
    Replies: 0
    Last Post: 12-04-2009, 01:57 PM
  6. Help me move the locked cells protected
    By jonicute in forum Excel - New Users/Basics
    Replies: 0
    Last Post: 02-17-2009, 09:53 PM
  7. [SOLVED] Locked & protected cells still can be changed
    By Amenity Dana in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 11-03-2005, 10:00 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