ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Save As / Overwrite (https://www.excelbanter.com/excel-discussion-misc-queries/207537-save-overwrite.html)

Brent E

Save As / Overwrite
 
Good Day,

I am using macros in an Excel file perform sorts on data and save each sort
type as a seperate html file. I want to be able to use this macro to perform
automatic updates.

If I use the Workbook.SaveAs command, I am constantly prompted whether to
overwrite the existing file. I do not want this box to appear.

Is there a variant to the Workbook.SaveAs command that automatically
overwrites a file with the same file name without prompting for a
yes/no/cancel?

Thanks,

Mike H

Save As / Overwrite
 
Hi,

Try something like this

Sub SaveMeeeee()
Application.DisplayAlerts = False
ThisWorkbook.SaveAs Filename:="MyFileName"
Application.DisplayAlerts = True
End Sub

Mike

"Brent E" wrote:

Good Day,

I am using macros in an Excel file perform sorts on data and save each sort
type as a seperate html file. I want to be able to use this macro to perform
automatic updates.

If I use the Workbook.SaveAs command, I am constantly prompted whether to
overwrite the existing file. I do not want this box to appear.

Is there a variant to the Workbook.SaveAs command that automatically
overwrites a file with the same file name without prompting for a
yes/no/cancel?

Thanks,


Brent E

Save As / Overwrite
 
Thanks Mike,

I think that'll work. I'll let you know momentarily.

"Mike H" wrote:

Hi,

Try something like this

Sub SaveMeeeee()
Application.DisplayAlerts = False
ThisWorkbook.SaveAs Filename:="MyFileName"
Application.DisplayAlerts = True
End Sub

Mike

"Brent E" wrote:

Good Day,

I am using macros in an Excel file perform sorts on data and save each sort
type as a seperate html file. I want to be able to use this macro to perform
automatic updates.

If I use the Workbook.SaveAs command, I am constantly prompted whether to
overwrite the existing file. I do not want this box to appear.

Is there a variant to the Workbook.SaveAs command that automatically
overwrites a file with the same file name without prompting for a
yes/no/cancel?

Thanks,


Brent E

Save As / Overwrite
 
Thanks worked. Thanks Mike.

"Mike H" wrote:

Hi,

Try something like this

Sub SaveMeeeee()
Application.DisplayAlerts = False
ThisWorkbook.SaveAs Filename:="MyFileName"
Application.DisplayAlerts = True
End Sub

Mike

"Brent E" wrote:

Good Day,

I am using macros in an Excel file perform sorts on data and save each sort
type as a seperate html file. I want to be able to use this macro to perform
automatic updates.

If I use the Workbook.SaveAs command, I am constantly prompted whether to
overwrite the existing file. I do not want this box to appear.

Is there a variant to the Workbook.SaveAs command that automatically
overwrites a file with the same file name without prompting for a
yes/no/cancel?

Thanks,


Mike H

Save As / Overwrite
 
Glad I could help and thanks for the feedback

"Brent E" wrote:

Thanks worked. Thanks Mike.

"Mike H" wrote:

Hi,

Try something like this

Sub SaveMeeeee()
Application.DisplayAlerts = False
ThisWorkbook.SaveAs Filename:="MyFileName"
Application.DisplayAlerts = True
End Sub

Mike

"Brent E" wrote:

Good Day,

I am using macros in an Excel file perform sorts on data and save each sort
type as a seperate html file. I want to be able to use this macro to perform
automatic updates.

If I use the Workbook.SaveAs command, I am constantly prompted whether to
overwrite the existing file. I do not want this box to appear.

Is there a variant to the Workbook.SaveAs command that automatically
overwrites a file with the same file name without prompting for a
yes/no/cancel?

Thanks,



All times are GMT +1. The time now is 03:57 PM.

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