Hello all,
I am trying to initiate the edit of an Excel Workbook from within my applicattion and then intercept the Window Deactivate event. The opening of the Workbook works fine. But I keep getting an
An unhandled exception of type 'System.InvalidCastException' occurred in interop.excel.dll
Additional information: No such interface supported
error during runtime for the line
theExcelApp.WindowDeactivate += new Excel.AppEvents_WindowDeactivateEventHandler(ExcelWindow_Deactivate);
I am using the Visual Studio IDE and it provided me with the EventHandler designation. I am at a loss.
If anybody can tell me the proper way of assigning an EventHandler to an Excel Application Event, I would be much obliged.