+ Reply to Thread
Results 1 to 5 of 5

Automatically password protect sheet if cell is NOT blank.

  1. #1
    Registered User
    Join Date
    11-19-2018
    Location
    Houston
    MS-Off Ver
    1810
    Posts
    58

    Automatically password protect sheet if cell is NOT blank.

    Good day Excel wizards! Im look for some help preventing an issue from happening (cause it already happend)

    I have a workbook full of test certification forms where users enter test results, sign off, and send off to be reviewed (buddy check system)

    The problem:
    After the form has been completed, signed, and reviewed. A unknown user accidentally changed the results of a test sample.

    The solution:
    I want to make it so once the form has been reviewed ALL unprotected cells are password protected automatically.

    For example: I have attached a sample form to this thread. All cells in yellow or red are required to be filled out with the exception of 1-2 cells which can be modified if needed. All other cells are locked.

    What I am looking for is IF cells C39 & G39 are NOT blank THEN the entire sheet becomes password protected. This should prevent any accidental changes to the data, only select personnel will have the password to unlock and edit. I lack the VBA knowledge to even know where to start, hopefully someone can help!

    Thank you in advanced.
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,078

    Re: Automatically password protect sheet if cell is NOT blank.

    How about
    Please Login or Register  to view this content.
    change password in red to suit

  3. #3
    Forum Expert KOKOSEK's Avatar
    Join Date
    08-03-2018
    Location
    Pole in Yorkshire, UK
    MS-Off Ver
    365/2013
    Posts
    2,742

    Re: Automatically password protect sheet if cell is NOT blank.

    Not tested but into Workbook code should works:


    Please Login or Register  to view this content.
    Happy with my answer * Add Reputation.
    If You are happy with solution, please use Thread tools and mark thread as SOLVED.

  4. #4
    Registered User
    Join Date
    11-19-2018
    Location
    Houston
    MS-Off Ver
    1810
    Posts
    58

    Re: Automatically password protect sheet if cell is NOT blank.

    That worked! your awesome! Thanks!

  5. #5
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,078

    Re: Automatically password protect sheet if cell is NOT blank.

    You're welcome & thanks for the feedback

+ 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. protect each sheet with different password
    By boon-yao.tek in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-08-2015, 01:39 AM
  2. Replies: 3
    Last Post: 09-23-2013, 11:49 PM
  3. [SOLVED] Protect a sheet with a password, but secure the password
    By JimDandy in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-16-2013, 01:59 AM
  4. Protect sheet with 2 or more password
    By iazis in forum Excel General
    Replies: 3
    Last Post: 05-02-2012, 07:07 AM
  5. Protect Sheet & Password Protect Code
    By KLahvic in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-13-2009, 04:08 PM
  6. Password protect 1 sheet
    By LarryC in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-03-2008, 11:08 AM
  7. Password protect cell ranges NOT sheet
    By Nadia in forum Excel General
    Replies: 3
    Last Post: 12-13-2005, 01:00 AM

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