18.11.2014 Views

Microsoft Office

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Creating Custom Excel<br />

Add-Ins<br />

For developers, one of the most useful features in Excel is the capability to<br />

create add-ins. This chapter discusses this concept and provides a practical<br />

example of creating an add-in.<br />

What Is an Add-In?<br />

IN THIS CHAPTER<br />

Understanding add-ins<br />

Converting a workbook to an<br />

add-in<br />

Generally speaking, an add-in is something that’s added to software to give it<br />

additional functionality. Excel includes several add-ins, including the Analysis<br />

ToolPak and Solver. Some add-ins (the Analysis ToolPak, discussed in Chapter<br />

38, is one example) provide new worksheet functions that you can use in formulas.<br />

Ideally, the new features blend in well with the original interface so that they<br />

appear to be part of the program.<br />

Excel’s approach to add-ins is quite powerful because any knowledgeable Excel<br />

user can create add-ins from workbooks. An Excel add-in is basically a different<br />

form of a workbook file. Any Excel workbook can be converted into an add-in,<br />

but not every workbook is a good candidate for an add-in.<br />

What distinguishes an add-in form a normal workbook? Add-ins, by default,<br />

have an .xlam extension In addition, add-ins are always hidden, so you can’t display<br />

worksheets or chart sheets that are contained in an add-in. But, you can<br />

access its VBA procedures and display dialog boxes that are contained on<br />

UserForms.<br />

The following are some typical uses for Excel add-ins:<br />

n<br />

n<br />

To store one or more custom worksheet functions. When<br />

the add-in is loaded, you can use the functions like any<br />

built-in worksheet function.<br />

To store Excel utilities. VBA is ideal for creating<br />

general-purpose utilities that extend the power of Excel.<br />

The Power Utility Pak that I created is an example.<br />

771

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!