Here's a real head scratcher...Within the BeforeClose event, I call one of two procedures depending on whether the workbook is the only workbook in that particular instance of Excel. The first works fine. The second ends up working exactly like the first despite the use of Application.Quit. So, I end up having to click Excel's (the app's not the wb's) close button twice to get the desired effect. Any explanation would be greatly appreciated.
Code:
Sub CloseWorkbook()
ThisWorkbook.Windows(1).Visible = False
ThisWorkbook.Saved = True
ThisWorkbook.Windows(1).Close False
End Sub
Sub CloseWorkbookAndExcel()
ThisWorkbook.Windows(1).Visible = False
ThisWorkbook.Saved = True
Application.Quit
End Sub