I am curious about the application.quit command. As I understand it,
in Excel 2003, when my vba code runs into application.quit, it should
immediately go to the auto_close (if any) and then shut down Excel -
however, when I'm using it, it continues to run through my
subroutine - see simplified example below:
Sub test()
Application.Quit
MsgBox ("Test Message 1!")
MsgBox ("Test Message 2!")
MsgBox ("Test Message 3!")
MsgBox ("Test Message 4!")
MsgBox ("Test Message 5!")
MsgBox ("Test Message 6!")
MsgBox ("Test Message 7!")
End Sub
When I run this, I get 7 message boxes that come up - then Excel
quits. However, if I step through the code, Excel quits after the
first line.
Is this the expected result of an application.quit command?