XL98: How to Create an Add-in File in Microsoft Excel 98

ID: Q179008


The information in this article applies to:
  • Microsoft Excel 98 Macintosh Edition


SUMMARY

In Microsoft Excel 98 Macintosh Edition, the process you use to create an add-in file is different from the process you use for earlier versions of Microsoft Excel. This article contains detailed information about how to create an add-in file in Microsoft Excel 98 Macintosh Edition.


MORE INFORMATION

Add-in File Behavior

An add-in file in Microsoft Excel is a special type of workbook. An add-in file can contain worksheets, chart sheets, and Visual Basic for Application procedures and functions. Procedures 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 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 in Microsoft Excel 98 Macintosh Edition, use the following two-part process:

  • First, protect the projects in the workbook to prevent them from being viewed or edited after you create the add-in file.


  • Then, save the workbook as an add-in file.


Protecting the projects is very important in Microsoft Excel 98 Macintosh Edition. In earlier versions of Microsoft Excel, it is not necessary to protect the contents of an add-in file. However, in Microsoft Excel 98 Macintosh Edition, 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 more information about converting an add-in back into a workbook in Microsoft Excel 98 Macintosh Edition, see the following article in the Microsoft Knowledge Base:
Q179007 XL98: How to Convert an Add-in File into a Workbook
Protecting the Projects in a Workbook:

To protect the projects in a workbook, follow these steps:

  1. In Microsoft Excel, click the workbook you want to convert to an add- in file.


  2. Point to Macro on the Tools menu, and then 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.

    For example, the entry is similar to the following:
    
          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 then click OK.


Saving the Workbook as an Add-in File:

To save the workbook as an add-in file, follow these steps:

  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. Click the Summary tab.


  4. In the Title field, enter any name for the add-in.

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


  5. In the Comments field, enter any text that describes the add-in.

    This description will be displayed in the Add-Ins dialog box when you select the Add-In in the list of available add-ins.


  6. Click OK to close the Properties dialog box.


  7. On the File menu, click Save As.


  8. In the Save As dialog box, click Microsoft Excel Add-In in the Save File As Type box. If you want, change the file name and click Save.

    When you click Save, Microsoft 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 Microsoft Excel.

Additional query words: XL98 make making subroutine kbprg xlloadsave xlui xlvbahowto xlvbainfo

Keywords : kbprg
Version : MACINTOSH:98
Platform : MACINTOSH
Issue type : kbprb


Last Reviewed: August 13, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.