Importing and Exporting Components

Though moving components between Excel projects is very easy, you can also import and export components. One reason you might want to do this is that it allows you to reuse generic components in other applications using Visual Basic or VBA. Maybe you have some generic routines in a module that communicate with a database, for example. You could use Export to save the module to a file and then in, say, Microsoft Word, you could open up the VBE and import it into your Word application.

To Export a component, right-click the component in the Project Explorer and choose Export File, then navigate to the folder where you want to store the file and supply a filename.

To Import a component, right-click the project or any item associated with the project in the Project Explorer, choose Import File, navigate to the folder where the component is stored, select the file, and click Open. If learning how to program is this easy, you'll have it nailed in no time, right?

Was this article helpful?

0 0

Post a comment