Happy new year.
If you need an action to occur on a condition, you'll need an IF statement.
Because you want to change a screen option, you'll need some code.
So what we do is use an event to check teh value and take action
Something like:
If Range("A1") = "yourvalue" Then
'unprotect/unlock cell
Range("A1").Select
ActiveSheet.Unprotect
Selection.Locked = False
Else
'lock and protect
Range("A1").Select
ActiveSheet.Unprotect
Selection.Locked = False
End if
'reprotect sheet
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
idea...?
Danny
"abcdexcel" wrote:
Hi
I have a cell in which drop down list box is applied. Depending upon
the data in that cell, code needed to lock (protect / unprotect) the
adjacent cell.
Thnks & Regrds,
New Excel User.
--
abcdexcel
------------------------------------------------------------------------
abcdexcel's Profile: http://www.excelforum.com/member.php...o&userid=30021
View this thread: http://www.excelforum.com/showthread...hreadid=497330