Code to Quit App Doesn't Work

  • Thread starter Thread starter Sheldon
  • Start date Start date
S

Sheldon

Hello -

I have a workbook that automatically imports tables from a database via code
and is set with the Windows scheduler.

When it's done importing, I want it to close the workbook and quit the
application. At the end of the import code, I placed the following:

ActiveWorkbook.Close
Application.Quit

It doesn't close and the application doesn't quit. How can I get it to do
that?
 
This may be of help

Sub SaveAllAndQuit()
Application.ScreenUpdating = False
Application.DisplayAlerts = False
For Each wb In Application.Workbooks
wb.Save
Next wb
Application.Quit
End Sub
 
Back
Top