Private Sub CommandButton1_Click()
If ActiveSheet.ProtectContents = True Then ActiveSheet.Unprotect "123"
With ActiveSheet
.UsedRange.Locked = True
.Range("L:L").Locked = False
.EnableSelection = xlUnlockedCells
End With
ActiveSheet.Protect "123"
End Sub
dilerim işinize yarar
buton kodu: