Microsoft KB Archive/181198

= OFF98: Cannot Export Modules, Class Modules, or UserForms =

Article ID: 181198

Article Last Modified on 11/24/2003

-

APPLIES TO


 * Microsoft Excel 98 for Macintosh
 * Microsoft Word 98 for Macintosh
 * Microsoft PowerPoint 98 for Macintosh
 * Microsoft Office 98 for Macintosh

-



This article was previously published under Q181198



SYMPTOMS
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.



WORKAROUND
To "export" your Visual Basic for Applications code:

 In the Visual Basic Editor select the code to export making sure to select the Sub  and End Sub lines. On the Edit menu click Copy. In Simple Text or in a Word document, on the Edit menu click Paste. Save the file.

Note: If saving from Word:

 On the File menu click Save As. In the Save File as Type listbox select Text Only.</li> Select a folder for the file location.</li> Click OK.</li></ol> </li></ol>

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.

<div class="status_section">

STATUS
This behavior is by design of the Visual Basic Editor.

<div class="moreinformation_section">

MORE INFORMATION
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:


 * Activate the module, class module, or UserForm, and then click Export File on the File menu.
 * Right-click the module, class module, or UserForm in the Project window, and then click Export File on the shortcut menu.
 * If you remove a module, class module, or UserForm from a project, you are given the option of exporting it into a file before you remove it.

These options are not available in the programs included in Microsoft Office 98 Macintosh Edition. To export a module, class module, or UserForm, you must open your workbook, document, or presentation in the appropriate program included in Microsoft Office 97 for Windows, and then export the desired files.

Additional query words: OFF98 XL98 WD98 PP98

Keywords: kbnofix kbprogramming kbprb kbdtacode KB181198

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.