View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Gary Keramidas Gary Keramidas is offline
external usenet poster
 
Posts: 2,494
Default highlight locked cells

here's a simple way, you can change bold to a color if you want

Sub locked_cells()
Dim cell As Range
For Each cell In ActiveSheet.UsedRange
If cell.Locked = True Then
cell.Font.Bold = True
Else
cell.Font.Bold = False
End If
Next

End Sub

--


Gary


"scott" wrote in message
...
I just inherited a very large legacy spreadsheet that has a good bit of locked
cells throughout. Is there a way to maybe iterate through a page and highlight
or other formating of just cells that are locked?

It's very time-consuming to manually check a lot of cells to see if they have
been locked.