vba - Excel tickbox and lock the cell -


dears, need code following: when tick checkbox should freeze not possible edit it, long password typed in.

the checkbox connected cell , below macro assigned this: perhaps added existing macro?

thank you

sub checkbox_date_stamp()  dim cbx checkbox  'application.caller returns name of checkbox called macro set cbx = activesheet.checkboxes(application.caller)  '.topleftcell returns cell address located @ top left corner of cbx checkbox cbx.topleftcell     'check checkbox status (checked or unchecked)     if cbx.value = xlon         ' checkbox checked         ' user name , date-time         .offset(0, 1).value = environ("username")         .offset(0, 2).value =     else         ' checkbox unchecked; clear cell contents?         .offset(0, 1).clearcontents         .offset(0, 2).clearcontents     end if end 


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

reflection - How to access the object-members of an object declaration in kotlin -

php - Doctrine Query Builder Error on Join: [Syntax Error] line 0, col 87: Error: Expected Literal, got 'JOIN' -