ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How do I bypass the message to save when closing a file by macro? (https://www.excelbanter.com/excel-programming/371037-how-do-i-bypass-message-save-when-closing-file-macro.html)

[email protected]

How do I bypass the message to save when closing a file by macro?
 
When closing a file via macro, I continue to get the message do I want to
save this file. Can someone help me bypass that message.

Mark

How do I bypass the message to save when closing a file by macro?
 

Try...Application.DisplayAlerts=False


Die_Another_Day

How do I bypass the message to save when closing a file by macro?
 
The best approach would be this:
Dim File1 as Workbook
Set File1 = Workbooks("YourWorkbook.xls")
File1.Close False

Charles
sjmpcec @ anon. com wrote:
When closing a file via macro, I continue to get the message do I want to
save this file. Can someone help me bypass that message.



Tom Ogilvy

How do I bypass the message to save when closing a file by macro?
 
activeworkbook.Close SaveChanges:=False

--
Regards,
Tom Ogilvy


" wrote:

When closing a file via macro, I continue to get the message do I want to
save this file. Can someone help me bypass that message.



All times are GMT +1. The time now is 09:11 AM.

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