Is it possible to prevent opening of workbooks in the current instance of Excel?

T

tempest

I have created a stand-alone VB program (not VBA) which utilizes the
Excel application library object to create and manipulate some
workbooks. The instance of Excel launched by the VB program is not
visible by default. Basicly my program only displays a textbox
showing the progress of the program.

However, if a user decides to open an Excel workbook by clicking on a
xls file in Explorer *while the VB program is still running*, the
hidden instance of Excel will immediately become visible to handle the
user's workbook and thus exposing the workbooks my VB program is
updating. When this happens, the user has the ability to interrupt my
program's update process by clicking on or closing the workbooks or
even Excel itself.

Is there a way to prevent a hidden instance of Excel from opening the
user workbook launched through Windows Explorer? Basically I would
like the OS to launch another instance of Excel if the current
instance is not visible.

FYI, I am using Excel 2002 (XP) and VB6 (SP5) on Windows XP
Professional.

Any information would be greatly appreciated.

Thanks.
-jl
 

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