Application.DisplayAlerts = False
If Workbooks.Count = 1 Then
Application.Quit
Else
ThisWorkbook.Close
Application.DisplayAlerts = True
End If

とかどう?