Joe4
MrExcel MVP, Junior Admin
- Joined
- Aug 1, 2002
- Messages
- 73,380
- Office Version
- 365
- Platform
- Windows
I have the following code which does some manipulation to data and saves the file as a DBF. I would like the macro to automatically close Excel without prompting the user on whether or not they would like to save the file again. However, the Application.DisplayAlerts = False command does not seem to suppress that pop-up in this case.
Here is the pertinent section of code.
How can I do this?
Thanks.
P.S. I tried moving the Application.DisplayAlerts = False command just above the Application.Quit command and it still didn't make a difference.
Here is the pertinent section of code.
Code:
' Save as DBF file
Sheets("DBF").Select
Application.DisplayAlerts = False
ActiveWorkbook.SaveAs Filename:=myOutputFile, FileFormat:=xlDBF4, CreateBackup:=False
' Quit Excel
Application.Quit
Application.DisplayAlerts = True
Thanks.
P.S. I tried moving the Application.DisplayAlerts = False command just above the Application.Quit command and it still didn't make a difference.