gibt es einen trick, wie man sich geschützte Zellen kenntlich machen kann.
Sowas wie SpecialCells gibts ja da nicht, oder?
Gruß Achim
Sub ColorActive()
SheetR = 0 'Reset counter
SheetC = ActiveWorkbook.Worksheets.Count 'See how many sheets to work on
For DdD = 1 To SheetC 'Work from Sheet 1 to ...
Worksheets(DdD).Activate 'Activate active sheet
ActiveSheet.Unprotect 'Unprotect - assuming no password
For Each IteM In ActiveSheet.UsedRange 'Color cells according to locked
If IteM.Locked = False Then 'If not locked
IteM.Font.ColorIndex = 32 'Blue for unlocked
SheetR = SheetR + 1 'Add to cells fixed count
ElseIf IteM.Locked = True Then 'If IS locked ...
IteM.Font.ColorIndex = xlAutomatic 'Set color to default
End If
Next 'Loop next cell
ActiveSheet.Protect 'Re-protect
Next
MsgBox SheetR & " cells were colored Blue if 'unlocked'", 64 'Done message
End Sub