I keep getting an error message for my code. I would greatly appreciate any help I can get. When someone Selects cell K74 and types in anything (usually "X"), I need a dialog box to pop up with a yes or no question. If yes, the X remains. If no, the macro will undo the X. Thank you so much for taking the time to help!
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$K$74" Then
Sub Msgbox_Yes_No()
Dim Response As Integer
Response = MsgBox("Will personnel be involved with the atmospheric hazards evaluation, confined space classification, and documentation process?", Buttons:=vbYesNo)
If Response = vbYes Then
Exit Sub
Else
Application.EnableEvents = False
Application.Undo
Application.EnableEvents = True
End If
End Sub
Comment