Thread: Cell Protection
View Single Post
  #3   Report Post  
Gord Dibben
 
Posts: n/a
Default

Sub UnLocked_Cells()
Dim Cell As Range, tempR As Range, rangeToCheck As Range
Cells.Select
For Each Cell In Intersect(Selection, ActiveSheet.UsedRange)
If Not Cell.Locked Then
'If Cell.Locked Then
If tempR Is Nothing Then
Set tempR = Cell
Else
Set tempR = Union(tempR, Cell)
End If
End If
Next Cell
If tempR Is Nothing Then
MsgBox "There are no UnLocked cells in " & _
"the selected range."
End
End If
'select, shade or clear qualifying cells
tempR.Select
'tempR.Interior.ColorIndex = 3 'red
'tempR.ClearContents
End Sub


Gord Dibben Excel MVP

On Mon, 23 May 2005 12:38:02 -0700, "biglautz"
wrote:

Is there a tool I can run or maybe even a macro that would show me what cells
are locked or unlocked. I have a big worksheet that has a big mix of
protected and unprotected cells, so I am trying to find a short cut to see
which cells are which, without checking formating or entering data into each
cell.