Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Excel error
Message
From
13/01/2014 22:36:22
 
 
To
13/01/2014 18:06:35
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Title:
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01591785
Message ID:
01591811
Views:
31
>>Are you suggesting something like this:
>
>Pretty much, yes. In the similar case I had a class with oWord property and oWord_access() method, which would instantiate it if this.oWord=null, so the code was
>
>
>for i=1 to alen(aFNames)
>   loWord=this.oWord
>   loWord.open(aFNames[i])
>
>... word does more stuff here and closes the file in the end...
>
>   if i%100=0
>     this.oWord.quit(0)
>     this.oWord=null
>   endif
>endfor
>
>so the 2nd line would fire up this.oWord_access, which would instantiate word if it was just killed, or use the existing instance otherwise.

Thanks.

BUT

When I destroy Excel with
PROCEDURE DestroyExcel

TRY

_screen.oStuff.oExcel.displayalerts = .F.

CATCH
ENDTRY

TRY

_screen.oStuff.oExcel.QUIT()

CATCH

dummy = .t.

ENDTRY

TRY
_screen.oStuff.oExcel = NULL

CATCH

dummy = .t.

ENDTRY

RETURN
the task manager shows that Excel is still active! And the only way I can get rid of it is by cancelling the program and then it miraculously disappears!

(I confirmed with the debugger that the catch is NOT activated after I _screen.oStuff.oExcel.QUIT(), so I assume that the statement executes)

???
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform