Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Predicting that Excel is closing using events

I am trying to monitor Excel behavior through events. To
do this I register with Application. If the end-user
manually closes Excel and my registration is still
active, the Excel process stays around in an un-dead
state until my process exits.

Suppose that I have Excel open with no open workbooks. If
the user closes Excel, I don't get any events. How do I
figure this out in time to remove my registration before
Excel tries to exit and hangs?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 811
Default Predicting that Excel is closing using events

Hi Todd,

Unfortunately, there is no good answer to this. Excel doesn't expose any
events that would notify a controlling application that it's shutting down.
The best you can do is stash its window handle and always verify that you
can find an instance of Excel with that window handle before attempting to
do anything with your references. If you can't then set them all to nothing
and hope that takes care of it.

--
Rob Bovey, MCSE, MCSD, Excel MVP
Application Professionals
http://www.appspro.com/

* Please post all replies to this newsgroup *
* I delete all unsolicited e-mail responses *


"Todd Webb" wrote in message
...
I am trying to monitor Excel behavior through events. To
do this I register with Application. If the end-user
manually closes Excel and my registration is still
active, the Excel process stays around in an un-dead
state until my process exits.

Suppose that I have Excel open with no open workbooks. If
the user closes Excel, I don't get any events. How do I
figure this out in time to remove my registration before
Excel tries to exit and hangs?



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
Closing workbooks w/o closing Excel Barb in MD Excel Discussion (Misc queries) 3 February 15th 10 06:42 PM
weighted exams, predicting what the final exam needs to be to pass barren13 Excel Worksheet Functions 2 May 7th 09 09:05 PM
Predicting results Alfredo_CPA Excel Worksheet Functions 2 October 13th 08 10:33 PM
Predicting a Number From a Time Series Carl Excel Worksheet Functions 4 August 31st 06 08:51 AM
Predicting new Ys given new Xs using known relationship for X and malwatson Excel Discussion (Misc queries) 2 January 12th 05 09:07 PM


All times are GMT +1. The time now is 07:32 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"