PDA

View Full Version : locked cells



wilg
10-13-2011, 04:54 AM
Hi, i have a worksheet that I need most cells protected. However i want ability to unlock a range of cells with a password prompt but not unprotect the whole work sheet incase they delete some formulas.
Is there a way to change status of a range of cells from locked to unlocked with a password but still keep the sheet protected? Then reverse it?

Kenneth Hobs
10-13-2011, 05:50 AM
Yes. While one could use an Inputbox to get password, a textbox has a passwordchar property to hide it.

If you need an example, see the attachment. Since I did not know what range you meant, I used the Selection range. If you have a set range that you don't want protected even with the macro, then it will need modification. One can iterate the selected cells and only change the locked status for cells without formulas.

wilg
10-13-2011, 06:39 AM
Thanks Kennith. Your example works for me.