diff --git a/RhSolutions.AddIn/Tools/EventsUtil.cs b/RhSolutions.AddIn/Tools/EventsUtil.cs index 31063e4..a32dc47 100644 --- a/RhSolutions.AddIn/Tools/EventsUtil.cs +++ b/RhSolutions.AddIn/Tools/EventsUtil.cs @@ -10,6 +10,7 @@ internal static class EventsUtil RhSolutionsAddIn.Excel.SheetSelectionChange += RefreshExportButton; RhSolutionsAddIn.Excel.SheetActivate += RefreshButtons; RhSolutionsAddIn.Excel.WorkbookActivate += RefreshButtons; + RhSolutionsAddIn.Excel.WorkbookDeactivate += RefreshButtons; RhSolutionsAddIn.Configuration.OnSettingsChange += RefreshSettingTitle; } @@ -18,6 +19,7 @@ internal static class EventsUtil RhSolutionsAddIn.Excel.SheetSelectionChange -= RefreshExportButton; RhSolutionsAddIn.Excel.SheetActivate -= RefreshButtons; RhSolutionsAddIn.Excel.WorkbookActivate -= RefreshButtons; + RhSolutionsAddIn.Excel.WorkbookDeactivate -= RefreshButtons; RhSolutionsAddIn.Configuration.OnSettingsChange -= RefreshSettingTitle; }