LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Joseph Geretz
 
Posts: n/a
Default VB Automation is Whacking out my Excel Environment

Set m_AppExcel = New Excel.Application
m_AppExcel.Caption = "MyExcelViewer"
m_AppExcel.IgnoreRemoteRequests = True

After running my application containing the three statements above, Excel
starts to exhibit very bizarre behavior when launched from the windows
shell. When double clicking on an Excel document, Excel will launch, however
once the application spins up, the document doesn't open!

I've seen this behavior on both of my development machines. (Which so far
covers 100% of the machines on which the code has run, so this seems pretty
consistent.) On one of these, I was able to restore Excel functionality by
hacking the registry and changing the shell open command to add a /dde
parameter: "C:\Program Files\Microsoft Office\OFFICE11\EXCEL.EXE" /e /dde. I
mention this for its diagnostic value not to suggest that this should be
used as a fix for the problem.

Without resorting to the hack, the problem can be corrected with the
following code modification:

Set m_AppExcel = New Excel.Application
m_AppExcel.Caption = "MyExcelViewer"
m_AppExcel.IgnoreRemoteRequests = False

If I change the third statement to assign False, run my program, and then
exit my program, proper Excel shell functionality is restored. What's going
on here?

Here's the bottom line. We need to leverage Excel in order to diaply
documents for our own application, but we need to do so in a way which will
not disturb other Excel sessions which the user might have launched previous
to our application, or which the user might launch subsequent tou our
application. Is this possible? I'm having a lot of trouble keeping chnages
which I make to my own Excel server, from impacting the user's Excel
environment in general.

Thanks for any help which you can provide.

- Joe Geretz -



 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I isolate my Excel server (automation) from other Excel instances? Joseph Geretz Excel Discussion (Misc queries) 5 July 19th 13 03:18 PM
Excel Automation SelectionChange event cpotts Excel Discussion (Misc queries) 1 December 20th 04 05:15 PM
Excel aficionado wants to learn Access Hari Excel Discussion (Misc queries) 0 December 3rd 04 06:03 AM
Excel aficionado wants to learn Access Hari Excel Discussion (Misc queries) 0 December 3rd 04 05:45 AM
Excel user desires to learn ABC of Access Hari Excel Discussion (Misc queries) 1 December 3rd 04 02:32 AM


All times are GMT +1. The time now is 03:32 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"