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: 22
Default lock all cells of a certain color

Haven't found this yet in previous threads, but I'm sure i missed it.

I am trying to Lock all cells that are a certain color as follows:

Sub lock_all_tan()

For Each s In Sheets
For Each c In Cells
If c.ColorIndex = 40 Then
c.Locked = False
c.FormulaHidden = False
End If
Next
Next

End Sub

The above doesn't work at all, appreciate any help. Thanks, Jason
 
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 do I lock the color palette? Venus Excel Discussion (Misc queries) 3 February 24th 09 11:53 PM
How do I lock the color palette? Venus Excel Discussion (Misc queries) 5 February 24th 09 11:52 PM
How do I lock the color palette? Venus Excel Discussion (Misc queries) 0 February 13th 09 07:47 PM
how do I lock the fill color in a cell Graham Excel Worksheet Functions 4 February 9th 09 05:46 PM
lock cells based on interior color MIke Excel Discussion (Misc queries) 4 December 27th 07 08:59 PM


All times are GMT +1. The time now is 01:10 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"