Add-In File Behavior
An add-in file in Excel is a special type of workbook. An add-in file can contain worksheets, chart sheets, and Microsoft Visual Basic for Applications macros and functions. Macros and functions in an add-in file add optional commands and features to Excel without allowing a user to directly view or edit them.Unlike normal workbooks, an add-in file is not visible on the screen when you open it, 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.
How to Create an Add-In File
To create an add-in file, follow these steps:- 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.
For additional informationabout how to convert an add-in back into a workbook in Excel, click the following article number to view the article in the Microsoft Knowledge Base:
211561
How to convert an add-in file into a workbook in Excel 2000
How to Protect the Projects in the Workbook
- Open the workbook that you want to convert into an add-in file.
- On the Tools menu, point to Macro, and then 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 that you want to convert.
The entry will be similar to the following example:VBAProject (Mybook.xls)
- On the Tools menu, click Project name Properties.
- Click the Protection tab.
- Select the Lock project for viewing check box. Type a password in the Password box. Type the same password in the Confirm password box, and then click OK.
How to Save the Workbook as an Add-In File
- Click 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 box, type any name for your add-in.
The name that you provide is the name that appears in the Add-Ins dialog box. - In the Comments box, type any text that describes your add-in.
This description is displayed in the Add-Ins dialog box if you select your add-in from the list of available add-ins (click Add-Ins on the Tools menu). - Click OK to close the Properties dialog box.
- On the File menu, click Save As.
- In the Save As dialog box, click Microsoft Excel Add-In in the Save as type list. If you want to, change
the file name. Click Save.
When you click Save, Excel creates the add-in. - On the File menu, click Close.