Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to release an object referenced in a form property?
Message
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00523237
Message ID:
00523248
Views:
10
>Could somebody please expound what's wrong with this code?
>
>***************
>ThisForm.oCrystalApp = CreateObject("Crystal.CRPE.Application")
>
>Release ThisForm.oCrystalApp
>
>&& Message Error displayed
>Error: Must be a variable or array.
>
>***************
>
>Why?
>
>Thank you very much.

While I'm not familiar with object, assuming it's an out-of-process server, like Word or Excel, issue the command (such as ThisForm.oObject.Quit) to exit the object then set the variable reference to NULL. If it doesn't support such a command, simply setting it to NULL may be sufficient.
George

Ubi caritas et amor, deus ibi est
Previous
Reply
Map
View

Click here to load this message in the networking platform