View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
David Lewis[_3_] David Lewis[_3_] is offline
external usenet poster
 
Posts: 2
Default need code for disable selection of locked cells

Got code
Sub protect()

Dim ws As Worksheet

For Each ws In ActiveWorkbook.Worksheets
ws.EnableSelection = xlUnlockedCells
ws.protect Password:=""
Next ws

End Sub

I need to disable selection of locked cells
Is there a function like ws.DisableSelection = xlLockedCells?