Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP/Excel question - Closing Excel sheet
Message
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Title:
VFP/Excel question - Closing Excel sheet
Miscellaneous
Thread ID:
00292412
Message ID:
00292412
Views:
57
A little background: in vfp5, I had to use GETOBJECT() to instantiate an excel application, since CREATEOBJ('Excel.Application') OLE-errored on some machines. So, I had it working fine with GETOBJECT.

Then moved the app to vfp6, discovered:

a) GETOBJECT() didn't work any longer.
b) CREATEOBJ('Excel.Application') works fine now. However, if a user does not save an Excel sheet, it stays hidden in memory until the user shuts down the machine (not the vfp app or Excel, those close fine). At Shutdown user is prompted with "Do You Want to Save Book4" (or whatever) under Win95. Under NT, I had a Dr. Watson error. I can't find the instances running in the Task list...

My current last line of code in each Excel method is just:

thisform.oExcel.Visible = .T.

which worked fine under my vfp5 method. What do I need to add to close the OLE Excel application instance? Probably something simple, but this one's hard to test since I have to do a Shutdown to test it.
The Anonymous Bureaucrat,
and frankly, quite content not to be
a member of either major US political party.
Next
Reply
Map
View

Click here to load this message in the networking platform