Microsoft KB Archive/211563

= How to create an add-in file in Excel 2000 =

Article ID: 211563

Article Last Modified on 10/6/2004

-

APPLIES TO


 * Microsoft Excel 2000 Standard Edition

-



This article was previously published under Q211563





For a Microsoft Excel 97 version of this article, see 156942.

IN THIS TASK
SUMMARY Add-In File Behavior How to Create an Add-In File
 * How to Protect the Projects in the Workbook
 * How to Save the Workbook as an Add-In File



SUMMARY
This step-by-step article contains detailed information about how to create an add-in (.xla) file in Microsoft Excel 2000. In Excel 2000, the process that you use to create an add-in file is different than the process for versions of Microsoft Excel earlier than Excel 97.

back to the top

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.

back to the top

How to Create an Add-In File
To create an add-in file, follow these steps:
 * 1) Protect the projects in the workbook to prevent them from being viewed or edited after you create the add-in file.
 * 2) Save the workbook as an add-in file.

Protecting the projects is very important in Excel 2000. In versions of Microsoft Excel earlier than Excel 97, it is not necessary to protect the contents of an add-in file. However, in Excel 2000, if you do not protect projects in the workbook, others can view or edit the sheets and Visual Basic modules in the 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

back to the top

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:

where  is the name of the Visual Basic project, and   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  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.</li></ol>

back to the top

How to Save the Workbook as an Add-In File

 * 1) Click Close and Return to Microsoft Excel on the File menu.
 * 2) On the File menu, click Properties.
 * 3) In the Properties dialog box, click the Summary tab.
 * 4) 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.
 * 1) 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).
 * 1) Click OK to close the Properties dialog box.
 * 2) On the File menu, click Save As.
 * 3) 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.
 * 1) On the File menu, click Close.

After you create the add-in file, you can open the add-in file the same way that you 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 in Excel.

back to the top

Additional query words: addin make making subroutine XL2000 add in

Keywords: kbhowtomaster kbaddin kbfaq KB211563

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.