View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
dominicb[_87_] dominicb[_87_] is offline
external usenet poster
 
Posts: 1
Default Protecting Specific Cells In Excel


Good afternoon Excel slave

The menu option Tools Protection Protect Sheet is what you need an
this will protect all locked cells, and all cells are set to locked b
default in a new workbook. So to leave them untouched by protectio
you need to unlock them. Select all the cells to be unprotected, ctr
+ 1, Protection tab and uncheck the locked box. Now protect th
sheet.

In terms of VBA:

Selection.Locked = False

will clear the clear / set the locked status.

ActiveSheet.Protect

will set the protection (Contents, DrawingObjects, Passwords etc ar
all optional arguments).

HTH

Dominic

--
dominic
-----------------------------------------------------------------------
dominicb's Profile: http://www.excelforum.com/member.php...fo&userid=1893
View this thread: http://www.excelforum.com/showthread.php?threadid=39535