Software Archive
Read-only legacy content
17061 Diskussionen

Can't close a COM object

finnis_m
Einsteiger
517Aufrufe
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 Antworten
Intel_C_Intel
Mitarbeiter
517Aufrufe
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
finnis_m
Einsteiger
517Aufrufe
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
Antworten