Sub Button1_Click()
ActiveSheet.Unprotect Password:="G1ng3r"
Range("B5:M15").SpecialCells(xlCellTypeConstants).Locked = True
ActiveSheet.Protect Password:="G1ng3r"
End Sub
Hi,Hi, This works great.
Some of the cells have dropdown boxes in. How can I make sure it locks Drop Down 35 which is in cell E11.
Thanks
Range("P19").SpecialCells(xlCellTypeConstants).Locked = True
Range("B5:O15", "P19").SpecialCells(xlCellTypeConstants).Locked = True
You are welcome.Absolutely perfect, thank you so much
Welcome backI'm back again I have the links for the dropdowns on another tab. I have tried
Sheet8.Range("H3").SpecialCells(xlCellTypeConstants).Locked = True
but it doesn't work, Any idea's
Sub Button1_Click()
ActiveSheet.Unprotect Password:="G1ng3r"
Range("B5:O15", "P19").SpecialCells(xlCellTypeConstants).Locked = True
Application.Goto ActiveWorkbook.Sheets("Sheet3").Range("H3")
ActiveSheet.Unprotect Password:="G1ng3r"
Range("H3").SpecialCells(xlCellTypeConstants).Locked = True
ActiveSheet.Protect Password:="G1ng3r"
Application.Goto ActiveWorkbook.Sheets("Sheet1").Range("A1")
ActiveSheet.Protect Password:="G1ng3r"
End Sub