I have this code in a Sub Procedure:

Workbooks("New Med Sheets1").SaveAs S

S is a string variable that contains the name I want to save the workbook to. The problem is filename workbook already exists. I want to overwrite WITHOUT seeing a prompt asking if I want to overwrite it.

How can I make it overwrite without prompting/asking me about it?

I tried putting Application.DisplayAlerts = False above the code that saves the workbook, but DisplayAlerts has no effect.