excel - Dynamically protecting cells in a row based on "Y" Value in the Checked column? -


i need protect cells in particular row if user enters y (yes) column of particular row indicates user has reviewed data , correct. have not been able figure out how make happen. know how this? much, elias

as per request , byron's comments, edited code. code should pasted worksheet module

private sub worksheet_change(byval target range) application.enableevents = false on error goto exiter set sh = target.parent         if target.value = "y" , target.column = 1             unprotect password:="whatever"             each currow in sh.usedrange.rows                 if sh.cells(currow.row, 1) = "y"                     sh.cells(currow.row, 1).entirerow.locked = true                 else                     sh.cells(currow.row, 1).entirerow.locked = false             end if             next             sh.protect password:="whatever"         end if exiter: application.enableevents = true end sub 

Comments

Popular posts from this blog

searchKeyword not working in AngularJS filter -

sequelize.js - Sequelize: sort by enum cases -

user interface - how to replace an ongoing process of image capture from another process call over the same ImageLabel in python's GUI TKinter -