ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How to disable save message when I click the cross to close the file (https://www.excelbanter.com/excel-programming/364922-how-disable-save-message-when-i-click-cross-close-file.html)

hon123456

How to disable save message when I click the cross to close the file
 
Dear all,
When I close a excel file by click the cross on the left
top corner, excel will prompt me to save the file or not. I want the
excel not to save the file and not to prompt me to save. How can I
disable the save message when I press the cross to close the excel
file?

Thanks.


NickHK

How to disable save message when I click the cross to close the file
 
Peter,
There is the Workbook_BeforeClose event:
ThisWorkbook.Saved=True

NickHK

"hon123456" wrote in message
ups.com...
Dear all,
When I close a excel file by click the cross on the left
top corner, excel will prompt me to save the file or not. I want the
excel not to save the file and not to prompt me to save. How can I
disable the save message when I press the cross to close the excel
file?

Thanks.




hon123456

How to disable save message when I click the cross to close the file
 
Thanks NickHK

NickHK 寫道:

Peter,
There is the Workbook_BeforeClose event:
ThisWorkbook.Saved=True

NickHK

"hon123456" wrote in message
ups.com...
Dear all,
When I close a excel file by click the cross on the left
top corner, excel will prompt me to save the file or not. I want the
excel not to save the file and not to prompt me to save. How can I
disable the save message when I press the cross to close the excel
file?

Thanks.




All times are GMT +1. The time now is 08:16 AM.

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