View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Can you highlight locked cells in excell, so you can check i

But the conditional formatting that I suggested will still indicate whether the
cell is locked -- no matter if the sheet is protected or not.

Shane Devenshire wrote:

As the two answers suggest Locked < Protected. To indicate Locked cells
regardless of protection using conditional formatting will require a little
more work.

Also, it sounds like you want to toggle this featu

Sub Locked()
Dim cell As Range
Dim c As Range
Dim myNoColor As Boolean
For Each cell In Selection
If cell.Locked And cell.Interior.ColorIndex < 3 Then
myNoColor = True
Exit For
End If
Next cell
If myNoColor = True Then
For Each cell In Selection
If cell.Locked Then cell.Interior.ColorIndex = 3
Next cell
Else
Selection.Interior.ColorIndex = xlColorIndexNone
End If
End Sub

There is a major potential problem with using this approach - your cells
will loose any default fill colors.

--
If this helps, please click the Yes button.

Cheers,
Shane Devenshire

"Tony" wrote:

Can you highlight locked cells in excell, so you can check you have locked
the right ones, and after checking turn the highlight off



--

Dave Peterson