OFF98: Cannot Export Modules, Class Modules, or UserForms

ID: Q181198


The information in this article applies to:
  • Microsoft Excel 98 Macintosh Edition
  • Microsoft Word 98 Macintosh Edition
  • Microsoft PowerPoint 98 Macintosh Edition
  • Microsoft Office 98 Macintosh Edition


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:

  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:

    1. On the File menu click Save As.


    2. In the Save File as Type listbox select Text Only.


    3. Select a folder for the file location.


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



STATUS

This behavior is by design of the Visual Basic Editor.


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 : kbdta kbdtacode xlvbainfo OffVBA
Version : MACINTOSH:98
Platform : MACINTOSH
Issue type : kbprb


Last Reviewed: August 13, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.