ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Macro help - "Save As" when a file already exists (https://www.excelbanter.com/excel-programming/329676-macro-help-save-when-file-already-exists.html)

Dave

Macro help - "Save As" when a file already exists
 
I am using a macro to populate an existing file and then password protect the
file. Since the file already exists, I get the do you want to save over the
existing file message. I do want to save over the existing file. When I
recorded the macro, it does not include the response to the save over the
existing file question. Is there code to make the macro save over the
existing file?

Thanks

Ron de Bruin

Macro help - "Save As" when a file already exists
 
You can use this Dave

Application.DisplayAlerts = False
'code
Application.DisplayAlerts = True


--
Regards Ron de Bruin
http://www.rondebruin.nl



"Dave" wrote in message ...
I am using a macro to populate an existing file and then password protect the
file. Since the file already exists, I get the do you want to save over the
existing file message. I do want to save over the existing file. When I
recorded the macro, it does not include the response to the save over the
existing file question. Is there code to make the macro save over the
existing file?

Thanks





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

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