View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Jos Vens[_2_] Jos Vens[_2_] is offline
external usenet poster
 
Posts: 134
Default Solution Found, but strange: Application.Quit en Excel crash

Hi,

I found the solution: when I set Application.EnableEvents=false, before
Application.Quit, there is no further code running and there is no crash,
not on Office XP nor on Office 2000. I still wonder why Excel continues
running code after Application.Quit??? As far as I remember, it worked fine
when my userform was modal.

Jos

"Jos Vens" schreef in bericht
...
Hi,

My program starts with a Login-form, where the user has to give a password
to go inside the application. On that login-form, you have an OK-button,
and a Cancel button.

Pressing the cancel button closes the form and then quits excel with
application.quit.

Not always but often, excel crashes here, and I don't know why. In the
past, I got some reasons for a crash:

-not unloading the form and application.quit = crash
-not Office XP-SP3 = crash

So now, it works fine (I installed SP3 on Office XP). However, on another
machine with Office2000, it didn't crash until I installed SP3 of
Office2000.

What am I doing wrong, why is Excel crashing on Application.quit?

Thanks
Jos Vens