ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   suppress Excel save message (https://www.excelbanter.com/excel-programming/344139-suppress-excel-save-message.html)

Ben

suppress Excel save message
 
Hi all,

I have quick, how do I suppress Exce's save file message box right before I
close the workbook? I tried to put the application.displayalert = false in
the workbook's BeforeClose event, but that does not appear to work. Please
share your thoughts. Thanks in advance.

Ben



Leith Ross[_144_]

suppress Excel save message
 

Hello Ben,

Add this to your code...

ThisWorkbook.Saved = True

Setting this property True will suprress the "Save" message a
closing.

Sincerely,
Leith Ros

--
Leith Ros
-----------------------------------------------------------------------
Leith Ross's Profile: http://www.excelforum.com/member.php...fo&userid=1846
View this thread: http://www.excelforum.com/showthread.php?threadid=48021


Guldo K

suppress Excel save message
 
Ben ha scritto:
Hi all,

I have quick, how do I suppress Exce's save file message box right before I
close the workbook? I tried to put the application.displayalert = false in
the workbook's BeforeClose event, but that does not appear to work. Please
share your thoughts. Thanks in advance.


In the BeforeClose event, tell Excel that the file has been saved.
(even if it has *not*)

ThisWorkbook.Saved = True

This won't save the workbook; it just tells Excel that there's nothing
more to be saved :D

bye
--
Guldo
www.giapponegiappone.it
Powered by Debian Sid


All times are GMT +1. The time now is 06:22 AM.

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