Hi luke, Thanks, One more concerned
I have made the column changes in the macros given by you, what this macro does is that if you select column F & I try to edit or clear it then only it throws up the error, what I want is if a user select the all the column from B to M, then also it should show an error & if the user selects the columns which does not involve f & I, then the user can delete the contents.
Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
If Not (Intersect(Target, Range("c3:c50")) Is Nothing) Then
Range(Cells(Target.Row, 4), Cells(Target.Row, 5)).ClearContents
Range(Cells(Target.Row, 7), Cells(Target.Row, 8)).ClearContents
Range(Cells(Target.Row, 10), Cells(Target.Row, 13)).ClearContents
ElseIf Intersect(Target, Range("f3:f50")) Is Nothing And _
Intersect(Target, Range("i3:i50")) Is Nothing Then
GoTo EscapeClause
Else
Application.Undo
MsgBox "Don't touch my formulas!"
End If
EscapeClause:
Application.EnableEvents = True
End Sub