Beatrice
Board Regular
- Joined
- Sep 17, 2019
- Messages
- 85
- Office Version
- 2019
- Platform
- Windows
Hi experts, I need some help as the simple code for a pop up message always appear twice.
I want to process 3 checks and each of them might pop up once only
here is my code, could you please point out what did I do wrong?
Thanks in advance for your help.
I want to process 3 checks and each of them might pop up once only
here is my code, could you please point out what did I do wrong?
Thanks in advance for your help.
VBA Code:
Private Sub Worksheet_Calculate()
'popup message for part not found
Application.EnableEvents = True
Application.EnableEvents = False
If Range("h117").Value = 1 Then
MsgBox "Item 1 Not Found", vbExclamation, "Error"
End If
If Range("h145").Value = 1 Then
MsgBox "Item 2 Not Found", vbExclamation, "Error"
End If
If Range("h145").Value = 1 Then
MsgBox "Item 3 Not Found", vbExclamation, "Error"
End If
Application.EnableEvents = True
End Sub