Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If ActiveSheet.Cells(10, 4).Text <> "bacon" Then 'A drop down menu is listed on this cell, when "bacon" is selected I want C20 to be accessible
ActiveSheet.Unprotect
ActiveSheet.Range("C20").Locked = True
Else
ActiveSheet.Unprotect
ActiveSheet.Range("C20").Locked = False 'C20 will be a further drop down list so they can choose their further options dependant on the first selection
End If
ActiveSheet.Protect
End Sub
Hello,
I've got this code working for me in a blank excel file.
Yet when I use it in my actual project file, it's keeping cell "C20" unlocked regardless of the criteria in "D10".
Have you got any tips of what I can do, what to look out for?
I cannot see any spelling errors or any code that would counter act this?
Any help would be much appreciated,
Thank you!