Protection to add a line to Remove "Select Locked Cells" ???

C

Corey

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....
 
A

Abdul

Hi Coery,

Try this:

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

Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top