Excel 2007 Power Programming with VBA (Mr. Spreadsheets Bookshelf)

Generally speaking, a spreadsheet add-in is something added to a spreadsheet to give it additional functionality. For example, Excel ships with several add-ins. One of the most popular is the Analysis ToolPak, which adds statistical and analysis capabilities that are not built into Excel.

Some add-ins also provide new worksheet functions that can be used in formulas. With a well-designed add-in, the new features blend in well with the original interface, so they appear to be part of the program.

Comparing an add-in with a standard workbook

Any knowledgeable Excel user can create an add-in from an Excel workbook file; no additional software or programming tools are required. Any workbook file can be converted to an add-in, but not every workbook is appropriate for an add-in. An Excel add-in is basically a normal XLSM workbook with the following differences:

Note  

In the past, Excel allowed you to use any extension for an add-in. In Excel 2007, you can still use any extension for an add-in, but if it's not XLA or XLAM, you see the warning shown in Figure 21-1. This prompt occurs even if it's an installed add-in that opens automatically when Excel starts.

Figure 21-1: Excel warns you if an add-in uses a non-standard file extension.

Why create add-ins?

You might decide to convert your Excel application into an add-in for any of the following reasons:

About COM Add-Ins

Excel also supports COM (Component Object Model) add-ins. These files have a .dll or .exe file extension. A COM add-in can be written so it works with all Office applications that support add-ins. An additional advantage is that the code is compiled, thereby offering better security. Unlike XLAM add-ins, a COM add-in cannot contain Excel sheets or charts . COM add-ins are developed with Visual Basic 5 (or later) or Visual Basic .NET. Discussion of creating COM add-in procedures is well beyond the scope of this book.

 
Note  

The ability to use add-ins is determined by the user's security settings in the Trust Center dialog box. To display this dialog box, choose Developer Macro Security. Or, if the Developer tab is not displayed, choose Office Excel Options Trust Center and then click the Trust Center Settings button.

Категории