2
So what I want to do is have a message box that pops up when this Powerpoint file tries to close, saying "Did you send the data?" " Yes or no".
If you click "Yes", Excel closes, if you click "No", cancels the closing operation.
I am very novice with VBA, if you explain me step by step, I would appreciate it. I tried this code but it doesn’t work:
Private Sub PPTApp_BeforeClose(Cancel As Boolean)
If MsgBox("Text", _
vbQuestion + vbYesNo) = vbNo Then
Cancel = True
End If
End Sub