Programming Tips
When creating add-ins, the following tips will help you avoid common pitfalls:
Avoid referencing external libraries. Any reference that you include in your add-in must be present on the user’s machine, and that makes deploying the add-in more difficult.
Use modules to organize procedures. Module names group the add-in procedures in the Object Browser, as shown in Figure 22-5.
Use module names that don’t conflict with names from the VBA or Excel type libraries. Type libraries have priority, and if you use a module name like
Mathin your add-in, that module won’t support the Auto Complete feature.Lock the project for viewing before saving it as an add-in. Otherwise, the Visual Basic Editor will display the add-in in code windows when the user goes to edit a macro. That is confusing for most users.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access