I have a script for recording passwords. It has a cell where the user enters a code (cell C3) and the script returns (displays) the password in the adjacent cell (D3). The script also allows a user to click a button to generate a new code for a new password. The new code is displayed in cell C4. To make this script work and keep me from mistakenly changing other fields, I have locked the previous 3 cells (C3, D3 and D4 as well as the password and password code cells (G2:F5000). I then Protect the sheet.
What I would like to do is to lock JUST C3 to allow a user to enter a code. I thought I could do this with the ActiveSheet.Protect command but I can't seem to get it to work. Here is the code, with my attempt commented out:
Any help would be appreciated.
Bookmarks