Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Excell causes a GPF when closed, called from VFP
Message
From
04/08/1999 04:39:09
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
03/08/1999 02:40:59
Greenstein Yaacov
Meroz Software Systems
Jerusalem, Israel
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00248807
Message ID:
00249613
Views:
19
>>Can you post the code, that is calling Excel?
>
>X=CREATEOBJECT('Excel.Application')
>X.WORKBOOKS.OPEN(CFILE)
>X.VISIBLE=.T.

You should postpone the releasing of "X" or its going out of scope till excel exits.
*Excel commands ...
myHandle = fopen(cFile,12)
do while myHandle < 0
 myHandle = fopen(cFile,12) && Try to open temp xls read-write
enddo
=fclose(myHandle) && Excel released it
Release X
*ERASE (cFile) && If you want to do this !
You could also declare X as public.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform