ID: Q181198
The information in this article applies to:
In the programs listed at the beginning of this article, it is not possible to export modules, class modules, or UserForms from the Visual Basic Editor.
To "export" your Visual Basic for Applications code:
1. In the Visual Basic Editor select the code to export making sure to
select the Sub <RoutineName()> and End Sub lines.
2. On the Edit menu click Copy.
3. In Simple Text or in a Word document, on the Edit menu click Paste.
4. Save the file.
Note: If saving from Word:
a. On the File menu click Save As.
b. In the Save File as Type listbox select Text Only.
c. Select a folder for the file location.
d. Click OK.
To "import" the code saved when using the steps in this article for
exporting:
1. In Simple Text or in a Word document, open the file you saved as text
that contains the Visual Basic for Applications code to import.
2. On the Edit menu click Select All.
3. On the Edit menu click Copy.
4. In the Visual Basic Editor of the application you want to place the
Visual Basic for Applications commands, click in the code window.
5. On the Edit menu click Paste.
This behavior is by design of the Visual Basic Editor.
In the programs included in Microsoft Office 97 for Windows, you can export a module, class module, or UserForm from the Visual Basic Editor by performing any of the following steps:
Additional query words: OFF98 XL98 WD98 PP98
Keywords : kbdta kbdtacode xlvbainfo OffVBA
Version : MACINTOSH:98
Platform : MACINTOSH
Issue type : kbprb
Solution Type : kbnofix
Last Reviewed: April 29, 1998