Share via


Importing VBA Objects

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

Using the VBA Multi-Code Import add-in, you can share Microsoft® Visual Basic® for Applications (VBA) objects by importing existing objects into the current VBA project.

Note   To use the VBA Multi-Code Import add-in, you must first load it into the Office environment.

To import VBA objects to your project

  1. From the Add-Ins menu, select Multi-Code Import.

  2. Use the Browse button to find the objects you want to import.

    For example, if you just exported some VBA objects, you can browse to the target ..\Export folder to display a list of possible objects for importing.

  3. Select the items you want to import.

  4. Click Import, and the objects are added to your current VBA project.

Where necessary to avoid duplicate names, a sequential number is appended to each imported VBA object as it is copied into the Class Modules folder. For example, if the original object name was Sheet2, the imported name in the Class Modules folder is Sheet21.

Imported objects are inserted into your project and — because they are copies — belong to your project. There is no association with the original project where the objects were selected for import.

See also

Sharing and Reusing VBA Objects | Exporting VBA Objects