This example displays a message box that asks the user to confirm an exit command. If the user clicks No, the exit is cancelled.
Private Sub Session_BeforeExit(Continue As Boolean)
If MsgBox("Exit Reflection?", vbYesNo) = vbNo Then
Continue = False
End If
End Sub