What I'm trying to implement is to display a Pop-up if the user tries to modify a cell that contains the text "don't edit". The user will be able to modify the cell value only if accepts the the confirm button.
How could I apply this condition to a column that can grow and the position of the text "don't edit" can exists on any cell of the column 4?
I try with this macro and it works only to detect if the value of column D1, D2 and D3 cell of the columns 4 changes, then show a pop-up. But I don't know how to show a pop-up to request the confirmation to allows edit the cell if the user accepts, otherwise keep the "don't edit" value.
This my first attempt to show a message when the user changes a value:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Column = 4 Then
If Target.Row = 1 Or Target.Row = 2 Or Target.Row = 3 Then
Beep
MsgBox "Do you really want to change it?", vbYesNo + vbQuestion
End If
End If
End Sub
This a sample of my worksheet
