PDA

View Full Version : [SOLVED:] Block cells



nedy_03
03-02-2007, 12:17 PM
Hello,

I have on "M" column validation cells with two options: "Yes" and "No".Can anybody tell me how could I block the cells content from column "F" in case I choose "Yes" option in column "M"?

By ex : if on M1 I choose "Yes" the "F1" cell should be bocked (can not be modified) ...

Thx,
Nedy

Charlize
03-02-2007, 12:47 PM
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Column = 6 And Target.Offset(, 7).Value = "Yes" Then
MsgBox "You are not permitted to edit this value ...", vbExclamation
Target.Offset(, 1).Select
End If
End SubCharlize