Export all the code from a code module to a text file

Article contributed by Bill Coan

Go to the Project Explorer window of the Visual Basic Editor, right-click the module you want to export and select Export File.

You can import the resulting .bas file into another project by right-clicking the module and selecting Import File.