I was changing an old program and noticed that the Auto_Close() macro was not closing Excel completely as it used to with only 1 workbook open. The following code only closes Excel completely if you press the Close Window X (the lower of the 2 X's in the upper right corner). Using the Top X runs the Auto_Close macro but leaves a blank Excel Window open. Any ideas on a complete close with the upper X? Thank you.
Code:
SCnt = Workbooks.Count
If SCnt > 1 Then
ActiveWorkbook.Close SaveChanges:=True 'Control
Else
ActiveWorkbook.Save
Application.ScreenUpdating = True
ThisWorkbook.Saved = True
Application.Quit
End If