+ Reply to Thread
Results 1 to 7 of 7

protect sheet disable editing of non empty cell

  1. #1
    Valued Forum Contributor
    Join Date
    12-01-2011
    Location
    Philippines
    MS-Off Ver
    Excel 2016
    Posts
    949

    protect sheet disable editing of non empty cell

    hi,

    i have a code below that unprotect-lock non empty and unlocked cells-protect
    but my problem is even after running i can still edit non empty cells
    if i do it manually REVIEW->PROTECT SHEET thats the only way i cannot edit anymore non empty cells


    Please Login or Register  to view this content.

  2. #2
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,481

    Re: protect sheet disable editing of non empty cell

    Hi there,

    Try using:

    Please Login or Register  to view this content.


    Hope this helps - please let me know how you get on.

    Regards,

    Greg M

  3. #3
    Valued Forum Contributor
    Join Date
    12-01-2011
    Location
    Philippines
    MS-Off Ver
    Excel 2016
    Posts
    949

    Re: protect sheet disable editing of non empty cell

    hi,

    tried it i can still edit non empty cells

  4. #4
    Valued Forum Contributor
    Join Date
    12-01-2011
    Location
    Philippines
    MS-Off Ver
    Excel 2016
    Posts
    949

    Re: protect sheet disable editing of non empty cell

    if you select REVIEW->PROTECT SHEET
    the dialog box that appears has a checkbox that says "Protect worksheet and content of locked cells" above where you type your password i think somehow this is not applied when i use my code above

  5. #5
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,481

    Re: protect sheet disable editing of non empty cell

    Hi again,

    The code I suggested works correctly on my installation, but for a "brute force" approach try using:

    Please Login or Register  to view this content.

    Hope this helps - please let me know how you get on.

    Regards,

    Greg M

  6. #6
    Valued Forum Contributor
    Join Date
    12-01-2011
    Location
    Philippines
    MS-Off Ver
    Excel 2016
    Posts
    949

    Re: protect sheet disable editing of non empty cell

    got it to work

    my problem was the first code above was saved on the "PERSONAL.XLSB" in a module it was not saved on the actual file i was using
    i copied the code to the actual file and put it in the "aftersave" event
    saved data are now not editable when protected

    just realized this when wondering why it wont work on my end

    thanks for the help

  7. #7
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,481

    Re: protect sheet disable editing of non empty cell

    Hi again,

    Many thanks for this very useful feedback, and also for the Reputation increase - much appreciated

    You're very welcome - glad I was able to help.

    Best regards,

    Greg M

+ 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: 3
    Last Post: 12-19-2021, 03:21 AM
  2. Replies: 5
    Last Post: 03-10-2016, 06:55 PM
  3. Protect a sheet from editing, but allow AutoFilter
    By sinapourazima in forum Excel General
    Replies: 6
    Last Post: 07-26-2014, 03:44 PM
  4. VBA Protection - (Protect Sheet)-Disable
    By mcmunoz in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 09-11-2013, 01:59 AM
  5. when protect the sheet, delete and shift up is disable
    By nasim12w in forum Excel General
    Replies: 2
    Last Post: 08-08-2013, 03:38 PM
  6. Protect Sheet: Allow cell editing but nothing else
    By jodyflorian in forum Excel General
    Replies: 3
    Last Post: 03-10-2008, 09:06 AM
  7. [SOLVED] Disable Tools >Protection >Protect Sheet for all users but one
    By Win XP in forum Excel General
    Replies: 6
    Last Post: 01-17-2006, 06:50 PM

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