Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Excel won't paint correctly
Message
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00716458
Message ID:
00716907
Views:
17
>What was the funky state? How did you fix it?
>
>>Terry,
>>
>>Setting loExcel = .null. will get rid of the Excel object (provided it's not in the funky state I ran into), then the VFP memvar loExcel goes out of scope when the method returns. So there's no need to specifically code a RELEASE for the memvar.
>>
>>>Well in that case:
>>>
release oExcel
>>>
>>>VFP can release it's reference before you close Excel (i think:). I looked at my source, and noticed that the spread sheet was opened in print preview mode:
>>>
oExcel.Visible=.t.
>>>oExcel.ActiveWorkBook.PrintPreview() && PRINT PREVIEW SHOW
>>>release oExcel
>>>
>>>
>>>The task dialog shows NO excel

You need to invoke the Excel Quit method as well as release the object ref:
oExcel.Quit
release oExcel
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Reply
Map
View

Click here to load this message in the networking platform