I have the following code:
but I am prompted if I want to overwrite the existing file. How can I make it force the save and not ask the user for a confirmation?
VBA Code:
Sub addwb()
Application.ScreenUpdating = False
Dim wbNew As Workbook
Sheet1.Copy
Set wbNew = ActiveWorkbook
wbNew.SaveAs "C:\Users\Owner\Documents\Automation\TestWB.xlsx", 51
wbNew.Close True
End Sub
but I am prompted if I want to overwrite the existing file. How can I make it force the save and not ask the user for a confirmation?