/// <summary> /// Required procedure. Do not modify. /// </summary> /// <param name="application">Application object.</param> /// <param name="workbook">Workbook object.</param> public void _Startup(object application, object workbook) { this.thisApplication = application as Excel.Application; this.thisWorkbook = workbook as Excel.Workbook; openEvent = new Excel.WorkbookEvents_OpenEventHandler(ThisWorkbook_Open); thisWorkbook.Open += openEvent; beforeCloseEvent = new Excel.WorkbookEvents_BeforeCloseEventHandler(ThisWorkbook_BeforeClose); thisWorkbook.BeforeClose += beforeCloseEvent; }
/// <summary> /// Required procedure. Do not modify. /// </summary> /// <param name="application">Application object.</param> /// <param name="workbook">Workbook object.</param> public void _Startup(object application, object workbook) { this.thisApplication = application as Excel.Application; this.thisWorkbook = workbook as Excel.Workbook; openEvent= new Excel.WorkbookEvents_OpenEventHandler (ThisWorkbook_Open); thisWorkbook.Open += openEvent; beforeCloseEvent = new Excel.WorkbookEvents_BeforeCloseEventHandler(ThisWorkbook_BeforeClose); thisWorkbook.BeforeClose += beforeCloseEvent; }