ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   prompt to save when already saved (https://www.excelbanter.com/excel-programming/423290-re-prompt-save-when-already-saved.html)

Susan

prompt to save when already saved
 
you need

application.displayalerts = false

at the beginning of your code, and turn it back on again with "true"
at the end of your code.
:)
susan


On Feb 2, 3:33*pm, Scooter wrote:
I have a macro in a blank workbook that opens, updates and closes other
workbooks. * *The below 3 lines are what I repeat for the files to update. *
Why do I still get the "Do you want to save your changes..." prompt when it
closes a file?

* * Workbooks.Open Filename:="aaa.xls", UpdateLinks:=True
* * Workbooks("aaa.xls").Save
* * Workbooks("aaa.xls").Close




All times are GMT +1. The time now is 06:46 PM.

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