ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Allow a macro to save over another file (https://www.excelbanter.com/excel-discussion-misc-queries/125528-allow-macro-save-over-another-file.html)

Marie Bayes

Allow a macro to save over another file
 
I've written a macro which saves a file with a pre existing name, how can I
make the macro say Yes to overwrite the file that already exists?

Any help gratefully received. Thanks in advance.

John Bundy

Allow a macro to save over another file
 
Application.DisplayAlerts = False

turn back on if doing anything else


--
--
-John
Please rate when your question is answered to help us and others know what
is helpful.

"Marie Bayes" wrote in message
...
I've written a macro which saves a file with a pre existing name, how can
I
make the macro say Yes to overwrite the file that already exists?

Any help gratefully received. Thanks in advance.




Alan

Allow a macro to save over another file
 
Sandwich the code in

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

Regards,
Alan.
"Marie Bayes" wrote in message
...
I've written a macro which saves a file with a pre existing name, how can
I
make the macro say Yes to overwrite the file that already exists?

Any help gratefully received. Thanks in advance.





All times are GMT +1. The time now is 02:42 AM.

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