Handling Excel Apps?

A

andy.

Using VB.Net, and MS Excel 9.0 Object Library (2k)

My program runs Excel in the background to get a ton of
information. By default I have: myExcelApp.Visible =
False, but what I have trouble with is that if the user
should open a spreadsheet outside of the program my
current Excel Application becomes visible. What is worse
is that if they should open and then close Excel while my
program is executing my program dies with it. I did some
extra error loops to make it load a new Excel if my
current one should close but shouldnt there be a way to
avoid this all together?

To clarify.
1) User opens my program. (Excel gets some data in the
background.)
2) Program waits for user input to move to next
form/display.
3) User minimizes my program and then opens Excel.
- Any of my open workbooks suddenly become visible
here...
4) User finishes with Excel and closes it.
5) User maximizes my program and gives it some input to
move to the next form. (Hence more Excel loading needed.)
6) My program crashes because Excel has been closed.
 
V

Vic Eldridge

myExcelApp.IgnoreRemoteRequests = True
will make your instance private. Be sure to set this
property back to False, just before you kill off your
myExcelApp object, otherwise all future instances of Excel
will be affected.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top