![]() |
Protection to add a line to Remove "Select Locked Cells" ???
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.... |
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.... |
All times are GMT +1. The time now is 05:08 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com