LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,290
Default Having a cell display certain text or formatting when the worksheet is protected or unprotected

This handles the entire used range on the active sheet.
Change the range to suit...
'------------------------------
Sub ColorWhatsLocked()
Dim rngCell As Excel.Range
Application.ScreenUpdating = False
ActiveSheet.UsedRange.Interior.ColorIndex = xlColorIndexNone
For Each rngCell In ActiveSheet.UsedRange.Cells
If rngCell.Locked Then rngCell.Interior.ColorIndex = 3
Next 'rngCell
Application.ScreenUpdating = True
End Sub

Sub RemoveColor()
ActiveSheet.UsedRange.Interior.ColorIndex = xlColorIndexNone
End Sub
-------------
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware



"jonco"
wrote in message
Is there an easy way to have a cell display certain text or formatting when
the sheet is protected or unprotected? I'd like to have several cells,
A32:D32 be colored red (for instance) when the worksheet is unprotected.
You guys have been a GREAT help to me during this project. Thanks!!!!!
Jon


 
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
How can I merge unprotected cells in a protected worksheet? cnaval Excel Worksheet Functions 1 April 28th 10 12:43 AM
Delete unprotected cells in protected worksheet Len Silva Excel Worksheet Functions 1 July 30th 08 02:24 PM
How can I have formatting toolbar active for the unprotected(unlocked) cells of the protected worksheet??? sanam Excel Discussion (Misc queries) 6 July 20th 06 01:42 PM
Protected worksheet with unprotected cells i.c.w. remarks FrankOtter68 Excel Worksheet Functions 1 April 17th 06 04:21 AM
adding comments to unprotected cell/range in protected worksheet gone fishing Excel Worksheet Functions 0 February 8th 06 10:06 PM


All times are GMT +1. The time now is 01:19 PM.

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"