ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Exiting a workbook (https://www.excelbanter.com/excel-programming/274507-re-exiting-workbook.html)

John Wilson

Exiting a workbook
 
David,

Application.DisplayAlerts = True
should do it.

Another way would be to fool the workbook into thinking
it's already saved.
ThisWorkbook.Saved = True
just before the "close" should work.

John

David Ralph wrote:

Hi,

I'm trying to get Excel to exit without prompting the user to save the
workbook.

I have aready constructed the IF statement using a MSGBOX, but when you
choose the NO
option the Excel then prompts you if you wish to save the workbook before
exiting.

Is there some way of turning off Excels messaging, so it just exits?

Cheers

Dave




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

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