ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   save on exit message box (https://www.excelbanter.com/excel-programming/281831-save-exit-message-box.html)

Olly[_3_]

save on exit message box
 
Is their a way to display a message box, when the user click to exit
the worksheet using a macro?

The user will have 3 options Yes, No, Cancel.

How can I program this using VBA in Ms Excel XP?

------------------------------------------------

The code I use at the moment saves the worksheet without asking the
user:

Sub CloseSpreedsheet()
'Saves spreedsheet
ThisWorkbook.Saved = True
'Closes the application
Application.Quit
End Sub


All times are GMT +1. The time now is 02:15 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com