Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Closing workbooks w/o closing Excel | Excel Discussion (Misc queries) | |||
weighted exams, predicting what the final exam needs to be to pass | Excel Worksheet Functions | |||
Predicting results | Excel Worksheet Functions | |||
Predicting a Number From a Time Series | Excel Worksheet Functions | |||
Predicting new Ys given new Xs using known relationship for X and | Excel Discussion (Misc queries) |