Committee Add-Ins

Committee add-ins work inside Microsoft Excel and fully cooperate with the built-in features and tools provided by Microsoft Excel. They generally add items to menus and/or toolbars and allow the user to continue using all the built-in functionality of Microsoft Excel. Your committee add-in will have to trap for common conflicts that arise during the normal usage of Microsoft Excel. For example, if the user starts your process and happens to be in print preview mode, are you going to beep, display a message, or will an untrapped error occur because you didn't expect to be in this state? The committee add-in has to recover gracefully and provide very strong error handling for both known and unknown error conditions.

At a minimum you need to develop a testing suite that includes some of the more common conflicts that can occur when you're coexisting with Microsoft Excel and other add-ins. All of your entry points (places where the user starts your code via menus, toolbars, keystrokes, and/or events) should contain traps for the most common conflicts. While there's no way to provide for every possible situation that can occur when starting your add-in, you should ask yourself what happens to your code when:

Of course, your error handling may need to be adjusted and/or a test suite developed that tests for as many conditions as possible. As a rule, the committee add-in requires more testing than the dictator add-in because you have less control over the spreadsheet environment. Answering the questions above will reduce the number of conflicts, but the list is not all-inclusive.

The only way to find specific conflicts is with extensive testing. You should consider testing with Standard, Custom, and Run from CD installations. If you're going to skimp on testing, at least test the Standard installation, as this will be the most common installation. If optional Microsoft Excel/Office components are installed, it's possible that some menus will contain more choices than the Standard install.

If you are modifying built-in menus/toolbars, be sure to verify that you are adding and/or removing objects as expected. One of the properties you can specify when adding menus is where your new menu is placed. Rather than blindly using a numerical index to add or delete your menus (and assuming that the user has not customized the existing menus), use the new Microsoft Excel 97 FindControl method to locate an existing menu (called a ControlPopup) before deleting or adding your custom menus.

You may need to have a secondary location as a fallback in case the user has removed or customized the standard menu command bar. Menu customization is easier than ever from the Microsoft Excel interface, and part of your test plan should include non-standard menu and toolbar configurations.