LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default Protect formulas but still allow formatting, etc.?

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Protect Cell Formatting including Conditional Formatting Mick Jennings Excel Discussion (Misc queries) 5 November 13th 07 05:32 PM
Protect my formulas! VegasBurger Excel Worksheet Functions 4 June 14th 06 09:25 PM
Protect Formulas parteegolfer Excel Worksheet Functions 1 March 25th 06 02:09 AM
how to protect formulas in a cell Enrique Mahecha Excel Discussion (Misc queries) 4 December 27th 05 07:34 AM
protect formulas Todd[_6_] Excel Programming 3 September 10th 03 10:15 PM


All times are GMT +1. The time now is 07:13 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"