private void MyAddIn_NewWorkbook(Excel.Workbook Wb) { Debug.WriteLine("MyAddIn_NewWorkbook runs"); FlausModel flausModel = new FlausModel(Wb); if (flausModel.ModelIntegrity) { FlausModelByWorkbook.Add(Wb, flausModel); } }
private void MyAddIn_WorkbookActivate(Excel.Workbook Wb) { Debug.WriteLine("MyAddIn_WorkbookActivate runs"); if (FlausModelByWorkbook.ContainsKey(Wb)) { ActiveWorkbookFlausModel = FlausModelByWorkbook[Wb]; Debug.WriteLine(Wb.Flaus().ModelIntegrity); } else { ActiveWorkbookFlausModel = null; Debug.WriteLine("Flaus Modell is null"); } }