Page 1 of 1

Excel Activex in VL-WIN Check if open

Posted: Fri Mar 08, 2019 3:52 am
by atostaine
I am creating a spreadsheet using code like this:

* start Excel
Set_Ref Com(#ExcelApp) To(*CREATE_AS #VV_EXCEL.Application)
* Create worksheet
#ExcelApp.Workbooks.Add Template(-4167) Add_Retval(#ExcelWorkbook)
Set_Ref Com(#ExcelWorksheet) To(*Dynamic #ExcelApp.ActiveSheet)

I have routines to set Excel to *Null, but the user is closing the spreadsheet using the "X". That leaves my Excel reference open. Is there an event I can use know they closed it?

How can I check if excel is open and active?