Prompt: Do you want to replace the file?

  • Thread starter Thread starter banner_fish
  • Start date Start date
B

banner_fish

Guest
I am using a macro that will output a form. When the program runs again it prompts: Do you want to replace the existing file? Is there anyway I can turn this prompt off or bypass it? I need the whole process automated. Thanks!
 
Thanks for the tip, but it didn't work. It still prompts you about deleting the file. Anyone else????
 
Confirm file delete.

It didn't seem to work for me either. I still get the prompt with warnings=false. I assume the 'doCmd.setwarnings false' is in VBA, but still doesn't work.
Donal
 
Application.DisplayAlerts = False will resolve the issue

the following codes work for me in Excel VBA to bypass the
Prompt: Do you want to replace the file

---------------------------------------
Application.DisplayAlerts = False

ActiveWorkbook.SaveAs Filename:="yourfilename.xls", _
FileFormat:=xlNormal, _
Password:="", _
WriteResPassword:="", _
ReadOnlyRecommended:=False, _
CreateBackup:=False _
 

Users who are viewing this thread

Back
Top Bottom