+ Reply to Thread
Results 1 to 2 of 2

protect contents of cell after checking checkbox

  1. #1
    Registered User
    Join Date
    06-10-2005
    Posts
    12

    protect contents of cell after checking checkbox

    I have a spreadsheet with many records. The spreadsheet is protected, but all empty lines (records) are unprotected. All verified records are protected to prevent changes. I would like to add a checkbox to each record that would activate a macro to protect the contents of each record after checking it. After adding data to a new line, I would check the checkbox, which would change to protection setting of each cell in the record to protected. This would prevent changes to the information in each record, but would allow users of the worksheet to enter new information in unprotected cells. Since the worksheet is protected, and only authorized users would know the password, changes to information would be controlled.

    I thought code in VBA could be written to accomplish this, but I am not familiar enough with VBA to do this.

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,524

    Unlock Blank cells, lock non blanks cells, protect sheet with password

    Quote Originally Posted by carlossaltz
    I have a spreadsheet with many records. The spreadsheet is protected, but all empty lines (records) are unprotected. All verified records are protected to prevent changes. I would like to add a checkbox to each record that would activate a macro to protect the contents of each record after checking it. After adding data to a new line, I would check the checkbox, which would change to protection setting of each cell in the record to protected. This would prevent changes to the information in each record, but would allow users of the worksheet to enter new information in unprotected cells. Since the worksheet is protected, and only authorized users would know the password, changes to information would be controlled.

    I thought code in VBA could be written to accomplish this, but I am not familiar enough with VBA to do this.
    Hi,
    Try this code,
    Please Login or Register  to view this content.

+ 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