Is it possible to protect specific cells on the sheets, not sheets only specific cells.
Is it possible to protect specific cells on the sheets, not sheets only specific cells.
Check this out:
http://www.mrexcel.com/archive/Formatting/3114.html
-u
I tried the way that in this link:
- Select All cells on the worksheet (Ctrl-A)
- Go into Format Cells (Ctrl-1)
- Go to the Protection Tab
- Ensure that "Locked" is unticked( not selected)
- Click OK
- Select Collumns A-C (Ctrl-Space) to select a collumn, (Shift-RightArrow) to drag
- Go into Format Cells
- Lock these cells
- OK
- Tools, Protection, Protect SheetThis will only protect the locked cells
it protected the specific cells, but it canceled the format properties for the unprotect cells. Is there another way to protect and keep the format.
Hi Nader,
This has been around a while (I wish I knew who wrote it...)
Anyways, I adapted it to check a User entered array of cells and 'protect' only those cells.
There is code in the Sheet module as well as in the standard modules. It's in the Standard module (Module1) that you must enter your cells addresses.
Look in the Sub ''UndoZero" for these lines:
[vba]
' Enter the addresses of the cells to be 'protected'
' Be sure to format as in example
'//BEGIN USER CHANGE
CellRng = Array("$A$1", "$B$1", "$C$2")
'//END USER CHANGE
[/vba]
and enter your cell addresses as per the example.
Change the two msgboxes to suit. One for the cell protection and a second for erroring out (though I've not seen this code error out ...yet...)
Cheers,
dr
"Questions, help and advice for free, small projects by donation. large projects by quote"
http:\\www.ExcelVBA.joellerabu.com
Thank you for help.