This article was previously published under Q156942
Retired KB Content Disclaimer
This article was written about products for which Microsoft no longer offers support. Therefore, this article is offered "as is" and will no longer be updated.
In Microsoft Excel 97, the process you use to create an add-in file isdifferent than the process for earlier versions of Microsoft Excel. Thisarticle contains detailed information about how to create an add-in (.xla)file in Microsoft Excel 97.
Add-in File Behavior
An add-in file in Microsoft Excel is a special type of workbook. An add-infile can contain worksheets, chart sheets, and Visual Basic for Applications macros and functions. Macros and functions in an add-in file add optional commands and features to Microsoft Excel without allowing a user to directly view or edit them.
Unlike normal workbooks, when you open an add-in file, it is not visible onthe screen, and you cannot unhide it by clicking Unhide on the Window menu. An add-in file is displayed in the Project Explorer window in the Visual Basic Editor. However, you cannot view or edit an add-in file if it is protected with a password.
Creating an Add-in File
To create an add-in file in Microsoft Excel 97, use the following two-partprocess:
Protect the projects in the workbook to prevent them from being viewed or edited after you create the add-in file.
Save the workbook as an add-in file.
Protecting the projects is very important in Microsoft Excel 97. In earlierversions of Microsoft Excel, it is not necessary to protect the contents ofan add-in file. However, in Microsoft Excel 97, if you do not protectprojects in the workbook, others can view and/or edit the sheets and VisualBasic modules in the add-in file.
For more information about converting an add-in back into a workbook inMicrosoft Excel 97, see the following article in the Microsoft KnowledgeBase:
156943 XL97: How to Convert an Add-in File into a Workbook
Protecting the Projects in the Workbook:
In Microsoft Excel, activate the workbook you want to convert to an add-in file.
On the Tools menu, point to Macro, and click Visual Basic Editor.
In the Project Explorer window in the Visual Basic Editor, click the following bold entry:
Project name (File name)
where Project name is the name of the Visual Basic project, and File name is the name of the workbook you want to convert.
The entry will be similar to the following example:
On the Tools menu, click Project name Properties.
Click the Protection tab.
Select (check) the Lock project for viewing check box. Type a password in the Password box. Type the same password in the Confirm password box, and click OK.
Saving the Workbook as an Add-in File:
Close the Visual Basic Editor by clicking Close and Return to Microsoft Excel on the File menu.
On the File menu, click Properties.
In the Properties dialog box, click the Summary tab.
In the Title field, enter any name for your add-in. The name you provide will be the name that appears in the Add-Ins dialog box.
In the Comments field, enter any text that describes your add-in. This description will be displayed in the Add-Ins dialog box when you select your add-in in the list of available add-ins.
Click OK to close the Properties dialog box.
On the File menu, click Save As.
In the Save As dialog box, select Microsoft Excel Add-In(*.xla) in the Save As Type box. If you want, change the file name and click Save.
When you click Save, Microsoft Excel creates the add-in.
On the File menu, click Close.
After you create the add-in file, you can open the add-in file the same wayyou open any workbook. If the add-in file contains an Auto_Open macro, the macro runs and performs any actions for which it is programmed. Any functions and subroutines in the add-in file are available for use inMicrosoft Excel.