'Ask if you are sure you want to quit. If the answer is Yes, 'exit the presentation. If the answer is No, go to the next slide. Sub QuitOK() 'result is a variable to keep track of which button is clicked. Dim result 'MsgBox returns (will set the variable result to) vbYes if the 'Yes button is clicked and vbNo if the No button is clicked. result = MsgBox("Are you sure you want to quit", vbYesNo) If result = vbYes Then 'Was the Yes button clicked? ActivePresentation.SlideShowWindow.View.Exit Else 'Since Yes wasn't clicked, it must be No ActivePresentation.SlideShowWindow.View.Next End If End Sub