LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to know what ActiveX references are still open

Okay, so I'm about the millionth person to post about this topic, but I feel like I know what I should be doing, but have hit a wall.  I have read through pretty much everything I could find in the forums about references and ActiveX.

I am communicating with Excel via ActiveX, and everything works seemlessly, until I realized that if the user closes the Excel sheet (via an "exit" button on my FP), the "EXCEL.exe" process is still running.  I've read enough to know that this probably points to a reference that I have not closed.

Problem is, I have poured over my code, and as far as I can tell, I have closed every reference, in the opposite order it was opened (as I read to do in a post earlier).

Aside from casting references to int's to see what is still considered "active" (as I mentioned earlier, all the ones I can find are closed, so this doesn't help me), is there a way to determine which ActiveX references are still open?

Even a way outside of LV?  A Microsoft utility even or ...well anything!  This is very annoying, and I know it should be quick and easy, I just have to know what is remaining open.

Or, am I missing something else that might be keeping EXCEL.exe running?  (yes, I have an application quit and close the application reference)

Thanks for any help


0 Kudos
Message 1 of 4
(2,935 Views)

Hi Will,

As you said it yourself closing the same number of references as you open and using Application Quit should be enough to close down Excel.exe.

Did you run your code in highlight execution to see how the behavior of your program changes when you hit the "Exit" button on your Front Panel?

If you can post the minimum amount of code that reproduces the error, I will be more than happy to take a look at it.

Best regards,

Message Edited by Kalin T on 12-07-2006 03:11 PM

Kalin T.
0 Kudos
Message 2 of 4
(2,915 Views)

Will,

There, unfortunately, is no utility that can report this information for you. However, refnums are tricky beasts, and it's easy to have one open that you don't realize. I created this post to explain how it works for .NET - and the same holds true for ActiveX.

Of course, Excel likely won't be keep around just because some reference to a cell is still open - I'd guess the proxy would just return an error if Excel disappeared - but I don't know that for certain.

0 Kudos
Message 3 of 4
(2,892 Views)
Thanks to both Kalin and Bryan.

I apologize for taking so long, but I have been away from my work fairly frequently of late.

Kalin, I will try to find some time to do up a vi that will reproduce the behaviour, but I feel like I won't be able to (reproduce it), without the whole project.

Bryan, thanks for the link, it is useful information.

If I find out what's going on, I'll post it here.  Thanks for the help.
0 Kudos
Message 4 of 4
(2,877 Views)