ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   SaveAs without prompt (https://www.excelbanter.com/excel-programming/310239-saveas-without-prompt.html)

Steven K0

SaveAs without prompt
 
Hello,

Is there a way to overwrite a file with SaveAs without being prompted with a
dialog box? Or do you have to delete the file first and then save?

--
Thanks in advance,
Steven



Norman Jones

SaveAs without prompt
 
Hi Steven,

Try:

Sub Test()
Application.DisplayAlerts = False
ActiveWorkbook.SaveAs "YourFileName" '<<<== CHANGE
Application.DisplayAlerts = True

End Sub

---
Regards,
Norman



"Steven K0" wrote in message
...
Hello,

Is there a way to overwrite a file with SaveAs without being prompted with
a dialog box? Or do you have to delete the file first and then save?

--
Thanks in advance,
Steven




Gord Dibben

SaveAs without prompt
 
Application.DisplayAlerts = False

"your code

Application.DisplayAlerts = True

Gord Dibben Excel MVP

On Thu, 16 Sep 2004 20:16:35 -0500, "Steven K0" wrote:

Hello,

Is there a way to overwrite a file with SaveAs without being prompted with a
dialog box? Or do you have to delete the file first and then save?




All times are GMT +1. The time now is 09:29 PM.

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