Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Nicole Hughes   on Oct 26 In MS Office Category.

  
Question Answered By: Ibtihaj Akhtar   on Oct 26

I have been away at a conference and have only just been able to test this.

It seems that the macro is too busy doing quick stuff like message boxes to
process the Application.Quit which is a slow event.

If you put DoEvents in immediately following the Application.Quit, it works as
expected.


Sub test()
Application.Quit
DoEvents
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


Share: 

 

This Question has 5 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on application.quit - code continues to run Or get search suggestion and latest updates.


Tagged: