ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Autosave (https://www.excelbanter.com/excel-programming/305483-autosave.html)

Liz[_4_]

Autosave
 
When a workbook is closed automatically appears the
message "Do you want to save the changes?" How can I avoid
this message and always answer "No"?
Thank you.
Liz.

Ron de Bruin

Autosave
 
Hi Liz

In the BeforeClose event use this

Private Sub Workbook_BeforeClose(Cancel As Boolean)
ThisWorkbook.Saved = True
End Sub

Or if you close the file with code

ThisWorkbook.Close False



--
Regards Ron de Bruin
http://www.rondebruin.nl


"Liz" wrote in message ...
When a workbook is closed automatically appears the
message "Do you want to save the changes?" How can I avoid
this message and always answer "No"?
Thank you.
Liz.





All times are GMT +1. The time now is 07:44 AM.

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