Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 134
Default Application.Quit en Excel crash

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


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 134
Default Additional Information: Application.Quit en Excel crash

Additional information:

I think the problem has something to do with a non-modal Login-form. When I
trace, I encounter the application.quit command, but Excel does not quit! It
runs still some code, which is not valid anymore (hidden workbooks are
closed)

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



  #3   Report Post  
Posted to microsoft.public.excel.programming
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



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 983
Default Solution Found, but strange: Application.Quit en Excel crash

Thanks for posting your solution... I have had the smae problem in a 2000
application. I neer worried about it becuase we are migrating to 2003 but if
the problem persists...

"Jos Vens" wrote:

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




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,071
Default Solution Found, but strange: Application.Quit en Excel crash

Thanks for sharing the solution. It is *possible* that your code did
not crash with the userform showed modally because XL stops executing
the VBA code and stops the user from interacting with it while the
userform is visible. With a modeless form, all other activity proceeds
while the dialog box is visible. So, other macros including event
procedures will be executed *asynchronously* with the thread displaying
the userform.

--
Regards,

Tushar Mehta
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions

In article ,
says...
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




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel.Application.Quit() Mircea Pleteriu Excel Programming 1 March 8th 05 03:03 PM
Excel.Application.Quit() method Mircea Pleteriu Excel Programming 0 March 8th 05 02:39 PM
Excel application does not quit Gena Excel Programming 0 October 29th 04 06:17 PM
macro to close excel application other than application.quit mary Excel Programming 1 September 14th 04 03:43 PM
Excel 2003 and Application.Quit Dean[_6_] Excel Programming 6 June 22nd 04 06:05 PM


All times are GMT +1. The time now is 06:29 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"