suppress Excel save message

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
Hello Ben,

Add this to your code...

ThisWorkbook.Saved = True

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

Sincerely,
Leith Ros
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top