ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   skipping pop up box for saving changes when closing a file (https://www.excelbanter.com/excel-programming/312203-skipping-pop-up-box-saving-changes-when-closing-file.html)

tony

skipping pop up box for saving changes when closing a file
 
In my macro I open and close several files. One of them I dont want to save
the changes I have done to the file. I thought the following was a way to
elimate the "Do you want to save your changes" pop up box that shows up when
I close the file.....but for some reason excel does not agree with me. Thanks
for the help

Application.DisplayAlerts = False
Workbooks(Top25Report).Close Savechanges:=False
Application.DisplayAlerts = True

Jim Thomlinson[_3_]

skipping pop up box for saving changes when closing a file
 
thisworkbook.saved = true

Hope this helps...

"Tony" wrote:

In my macro I open and close several files. One of them I dont want to save
the changes I have done to the file. I thought the following was a way to
elimate the "Do you want to save your changes" pop up box that shows up when
I close the file.....but for some reason excel does not agree with me. Thanks
for the help

Application.DisplayAlerts = False
Workbooks(Top25Report).Close Savechanges:=False
Application.DisplayAlerts = True



All times are GMT +1. The time now is 03:51 PM.

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