View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Abdul[_2_] Abdul[_2_] is offline
external usenet poster
 
Posts: 137
Default Protection to add a line to Remove "Select Locked Cells" ???

Hi Coery,

Try this:

wks.Unprotect Password:="1234"
wks.EnableSelection = xlUnlockedCells

Thanks


Corey wrote:
Sub protect()
Application.ScreenUpdating = False
Dim wks As Worksheet
For Each wks In ThisWorkbook.Worksheets
wks.protect Password:="1234"
Next wks
Application.ScreenUpdating = True
End Sub


Sub Unprotect()
Application.ScreenUpdating = False
Dim wks As Worksheet
For Each wks In ThisWorkbook.Worksheets
wks.Unprotect Password:="1234"
Next wks
Application.ScreenUpdating = True
End Sub


Can i add a line of code to remove the TICK from "Select Locked Cells" ???

How?
Corey....