View Single Post
  #3   Report Post  
Stephen Bullen
 
Posts: n/a
Default

Hi Joseph,

Our application uses Excel as a server via the Excel COM interface
(automation). However, I'm finding that when the user opens other Excel
documents, these documents all share the same Excel window. If the user then
hits X to exit their document (this is the normal user approach) this shuts
down Excel altogether and my server is gone!

Also, our application streamlines the Excel window by removing all toolbars.
I'm finding that now when the user opens their own documents, their favorite
toolbars are gone. Again, it's the same basic issue. How do I isolate our
own Excel server from other instances of Excel in the user's environment?

Thanks for your help!


To fix the underlying problem, you can set
Application.IgnoreRemoteRequests=True to make Windows start a new instance of
Excel when the user double-clicks an xls. You might also need/want to set
Application.Interactive=False. There's still the chance of someone getting your
instance of Excel if they double-click a workbook that's embedded in a Word
document (for example), which you might be able to avoid by starting *two*
instances of Excel (untested) - one for you to use, one to accept the COM
requests.

P.S. How come there's no excel.vba group like there is for Word?


Public.Excel.Programming fulfills that purpose for Excel.

Regards

Stephen Bullen
Microsoft MVP - Excel
www.oaltd.co.uk