XL2000: How to Create an Add-in File

ID: q211563


The information in this article applies to:


SUMMARY

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


MORE INFORMATION

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, when you open an add-in file, it is not visible on the 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, use the following two-part process: 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 and/or edit the sheets and Visual Basic modules in the add-in file.

For more information about converting an add-in back into a workbook in Excel, please see the following article in the Microsoft Knowledge Base:
Q211561 XL2000: How to Convert an Add-in File into a Workbook

Protecting the Projects in the Workbook

  1. Open the workbook you want to convert to an add-in file.


  2. On the Tools menu, point to Macro, and click Visual Basic Editor.


  3. 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:
    
       VBAProject (Mybook.xls) 


  4. On the Tools menu, click <Project name> Properties.


  5. Click the Protection tab.


  6. Click to 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 click OK.


Saving the Workbook as an Add-in File

  1. Close the Visual Basic Editor by clicking 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, enter any name for your add-in.

    The name you provide will be the name that appears in the Add-Ins dialog box.


  5. In the Comments box, 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 from the list of available add-ins (click Add-Ins on the Tools menu).


  6. Click OK to close the Properties dialog box.


  7. On the File menu, click Save As.


  8. In the Save As dialog box, select Microsoft Excel Add-In in the Save as type list. If you want, change the file name and click Save.

    When you click Save, Excel creates the add-in.


  9. On the File menu, click Close.


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

Additional query words: addin make making subroutine XL2000 add in


Keywords          : kbdta xlloadsave xlui xlvbahowto xlvbainfo 
Version           : WINDOWS:2000
Platform          : WINDOWS 
Issue type        : kbhowto 

Last Reviewed: May 25, 1999