Software Archive
Read-only legacy content
17061 Discussions

Can't close a COM object

finnis_m
Beginner
511 Views
I am accessing an Excel file using COM routines a la the autodice example though I don't want to view the workbook and I want to close the instance of Excel rather than leave it running. I'm probably missing something obvious but I can't find any way of closing Excel using the DFCOM routines. Any suggestions?
0 Kudos
2 Replies
Intel_C_Intel
Employee
511 Views
I think you want the moral equivalent of Application.Quit. Look in the Autodice sample file Excel97A.f90 for the routine $Application_Quit($OBJECT, $STATUS) as an example.

hth,
John
0 Kudos
finnis_m
Beginner
511 Views
Thanks, that did the trick.
I had looked through the excel97a.f90 file to find various Excel commands/methods - but not a quit command. I guess I was looking for a Windows or COM library routine to close Excel rather than an Excel method.
Thanks again,
MVF
0 Kudos
Reply