Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'm trying to protect all the cells in a spreadsheet with formulas in
them (don't mind the user seeing the formulas, just don't want him changing them), have done so using the following code (compliments of this group, thanks!): Sub lock_cells() Set mySheets = ActiveWorkbook.Sheets For Each s In mySheets If s.Name < "Information Summary" Then s.Activate ActiveSheet.Unprotect Cells.Locked = False Selection.SpecialCells(xlCellTypeFormulas, 23).Locked =True ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True End If Next s End Sub Problem is, some functionality goes away -- e.g., I have some sheets where I have grouped rows/columns, and once the sheet is protected the user cannot collapse/expand these groups. Also, on a protected sheet the user cannot change any formatting -- can't bold or indent, change column width or font color/size, etc. Is there a way to simply lock only the cells with formulas but still allow the user to do anything else on the sheet(s)? Something like lock the cells without protecting the sheet? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Protect Cell Formatting including Conditional Formatting | Excel Discussion (Misc queries) | |||
Protect my formulas! | Excel Worksheet Functions | |||
Protect Formulas | Excel Worksheet Functions | |||
how to protect formulas in a cell | Excel Discussion (Misc queries) | |||
protect formulas | Excel Programming |