Hi,
I have this code from http://www.mrexcel.com/archive/VBA/19248.html
This does all the things I required, except clear the contents of the cell B7 when "BPS" is selected in B6.
Following is the code I am using:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If ActiveCell.Address <> Target.Address Then Exit Sub
If Target.Address = "$B$7" Then
If [B6] = "BPS" Then
ActiveSheet.Unprotect ("PASSWORD")
[B7].Locked = False
[B7].ClearContents
ActiveSheet.Protect ("PASSWORD")
MsgBox "Sorry, this is for ITS only" & vbCrLf & _
"", 64, "Access into cell B7 not allowed."
End If
End If
End Sub
Pls help me ensuring that cell value in B7 is cleared whenever B6 contains BPS...thanks
Bookmarks