Hi,
I am currently using this code assigned to a button which locks my sheet so no one can edit in a workbook but now i would like this code to only lock a particular cell which contains a list dropdown or range for eg. Cell C4 or C4:H4
Can someone please help me on this. Ive tried a lot but to no success.
Will be really thankful to you.
Sub LockSheet()
If ActiveSheet.ProtectContents = True Then
ActiveSheet.Unprotect
MsgBox "The Entity is now unlocked"
Else
ActiveSheet.Protect
MsgBox "The Entity is now locked"
End If
End Sub
I am currently using this code assigned to a button which locks my sheet so no one can edit in a workbook but now i would like this code to only lock a particular cell which contains a list dropdown or range for eg. Cell C4 or C4:H4
Can someone please help me on this. Ive tried a lot but to no success.
Will be really thankful to you.
Sub LockSheet()
If ActiveSheet.ProtectContents = True Then
ActiveSheet.Unprotect
MsgBox "The Entity is now unlocked"
Else
ActiveSheet.Protect
MsgBox "The Entity is now locked"
End If
End Sub