ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Overriding the overwrite confirmation prompt (https://www.excelbanter.com/excel-programming/396350-overriding-overwrite-confirmation-prompt.html)

Bob

Overriding the overwrite confirmation prompt
 
Is there a way to modify the line below so that if the file "Project
Status.txt" already exists, it will automatically be overwritten without
prompting the user to confirm the overwrite?

ActiveWorkbook.SaveAs Filename:="Project Status.txt", _
FileFormat:=xlText, CreateBackup:=False

Thanks in advance for any help.

Bob


Dave Peterson

Overriding the overwrite confirmation prompt
 
application.displayalerts = false
activeworkbook.saveas ....
application.displayalerts = true



Bob wrote:

Is there a way to modify the line below so that if the file "Project
Status.txt" already exists, it will automatically be overwritten without
prompting the user to confirm the overwrite?

ActiveWorkbook.SaveAs Filename:="Project Status.txt", _
FileFormat:=xlText, CreateBackup:=False

Thanks in advance for any help.

Bob


--

Dave Peterson

Bob

Overriding the overwrite confirmation prompt
 
Dave,
Thanks a million!
Bob


"Dave Peterson" wrote:

application.displayalerts = false
activeworkbook.saveas ....
application.displayalerts = true



Bob wrote:

Is there a way to modify the line below so that if the file "Project
Status.txt" already exists, it will automatically be overwritten without
prompting the user to confirm the overwrite?

ActiveWorkbook.SaveAs Filename:="Project Status.txt", _
FileFormat:=xlText, CreateBackup:=False

Thanks in advance for any help.

Bob


--

Dave Peterson



All times are GMT +1. The time now is 05:03 AM.

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