I am new to VB programming for change events and have been trying to stumble through... but would appreciate some help. I am trying to write code which says if a user attempts to change cell A1, display a message box. Right now I have this and it is not working. Any thoughts? Thanks!!
Private Sub Worksheet_Change(ByVal Target As Range)
With Target
If .Address = "$A$1" Then
If .Value <> "desired value" Then
MsgBox "Please don't change this cell"
.Select
End If
End If
End With
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
With Target
If .Address = "$A$1" Then
If .Value <> "desired value" Then
MsgBox "Please don't change this cell"
.Select
End If
End If
End With
End Sub