Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Reliable way to release Excel?
Message
 
 
To
22/10/2003 08:43:47
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00840734
Message ID:
00841013
Views:
23
Grigore,

>In the code I had a call to a standard messagebox ("The report was saved to (path)". When I removed the call, my problem was gone. I have absolutely no idea why.
>
>If i put it back, the problem reappears. I moved all the code in a separate method, call it, then messagebox, then thisform.release. And now it works ok - the oExcel object is release quite instantaneous (the file wasn't big - about 30 rows in one single worksheet).

MessageBox() is modal your form can't release while any of it's methods are on the call stack.

>However, while I was digging the problem I found another problem and this is definately a bug in VFP8 SP1:
>
>Create a prg. Let's name it "test.prg".
>
>The contents:
>
>x = Createobject("excel.application")
>x.quit
>
>Keep it open and visible on screen, then run it with Run button in toolbar. It works ok, VFP writes in Command Window "DO test.prg". Run it again as fast as you can. "Syntax error". In command window, VFP tries to run foxuser.dbf.
>
>well... this is not a big deal - no one uses the prgs in this way, but I thought it worth a mention.

I don't see this, If I click the ! button it runs and focus returns to the command window, so the ! button doesn't reenable, until I click focus back to the code window.
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Reply
Map
View

Click here to load this message in the networking platform