Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Test for Excel instance?
Message
From
22/02/2002 14:54:30
 
 
To
22/02/2002 13:51:31
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00621712
Message ID:
00623888
Views:
20
Zlatin:

Thank you for following this up and providing such a full and authoritative explanation. This is very much appreciated. Incidentally, the server on which this code runs is being upgraded from NT4 to 2000 server soon so your additional comment in this regard are appreciated!

Thanks.

-=Gary

>>Zlatin:
>>
>>Thanks for checking this out. Whilst it may work the way it should with Excel XP, it certainly doesn't with Excel 2000 :(
>>
>>-=Gary
>>
>>
>
>Checked with Excel 2000 (on Win98) in VFP6 SP5:
>
>oleApp = GETOBJECT(, "Excel.Application")
>
>It raises OLE error if I do not have instance of Excel.
>{OLE error code 0x800401e3: Operation unavailable.}
>
>However I have done some tests (on Win2k) creating and quit-ing (also releasing variables with reference to) instances of Excel from different instances of VFP.
>
>Note the following:
>As soon as you call
oleApp.quit
after successful execution of the line above, the visual part of Excel disappears. However if some other instance of another application has a variable that is pointing to the same Excel instance, Excel stays resident - you can see it as a process in Processes list in Task manager of Win2k. So you should check whether
>
>oleApp.Visible = .F.
>oleApp.Workbooks.Count = 0
>
>If the above is true you may be sure that the Excel instance do not have documents opened in it and is not visible for the user.
>
>HTH
-=Gary
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform