ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Save As Overwrite (https://www.excelbanter.com/excel-programming/310090-save-overwrite.html)

[email protected]

Save As Overwrite
 

Is there some way to keep the window
that tells me that a file already exists and
do I want to overwrite it from popping up
and let a worksheet save as execute?

give that fStr hold the name of the file


Set wb = ActiveWorkbook
wb.SaveAs (fStr)

is what I have now....but I get the message.


Norman Jones

Save As Overwrite
 
Hi Marston.

One way:

Set wb = ActiveWorkbook
Application.DisplayAlerts = False
wb.SaveAs (fStr)
Application.DisplayAlerts = True

---
Regards,
Norman



" wrote in message
...

Is there some way to keep the window
that tells me that a file already exists and
do I want to overwrite it from popping up
and let a worksheet save as execute?

give that fStr hold the name of the file


Set wb = ActiveWorkbook
wb.SaveAs (fStr)

is what I have now....but I get the message.





All times are GMT +1. The time now is 12:13 AM.

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