ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   within a macro how can I suppress the warning pop "A file named xxxx.xls already exists in this location. Do you want to replace it?" (https://www.excelbanter.com/excel-programming/293961-within-macro-how-can-i-suppress-warning-pop-file-named-xxxx-xls-already-exists-location-do-you-want-replace.html)

Pete McCOsh

within a macro how can I suppress the warning pop "A file named xxxx.xls already exists in this location. Do you want to replace it?"
 
Kevin,

Application.displayalerts=false

Activeworkbook.saveas filename:="C:\SameName.xls"

Application.displayalerts=true

-----Original Message-----
Within a macro how can I suppress/omit the warning pop "A

file named xxxx.xls already exists in this location. Do
you want to replace it?"

Thanks in advance.

Sincerely,
Kevin Waite





All times are GMT +1. The time now is 08:59 PM.

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