rjplante
Well-known Member
- Joined
- Oct 31, 2008
- Messages
- 574
- Office Version
- 365
- Platform
- Windows
I have the code listed below which is being called when a cell changes from 'no' to 'yes'. When the message box pops up and I click 'no', the message box chimes and displays again and I have to click it twice to get it to go away. I am running Excel 2007. What is causing this to do this? This macro is located in a worksheet code window and not a global workbook module. It needs to be there due to the fact that the code that monitors the change from 'no' to 'yes' is also in this sheet code window. Thanks for any ideas as I am at a loos on where to go from here.
Robert
-------------------------------
Sub MSTS_Update()
Application.EnableEvents = False
i = MsgBox("Do you want to update the Master Stability Tracking Sheet?", vbYesNo + vbExclamation + vbDefaultButton2)
If i = 7 Then 'NO
Application.EnableEvents = True
Exit Sub
ElseIf i = 6 Then 'YES
Application.ScreenUpdating = False
'rest of macro here
End If
Application.EnableEvents = True
End Sub
Robert
-------------------------------
Sub MSTS_Update()
Application.EnableEvents = False
i = MsgBox("Do you want to update the Master Stability Tracking Sheet?", vbYesNo + vbExclamation + vbDefaultButton2)
If i = 7 Then 'NO
Application.EnableEvents = True
Exit Sub
ElseIf i = 6 Then 'YES
Application.ScreenUpdating = False
'rest of macro here
End If
Application.EnableEvents = True
End Sub