XL97: Cannot Import/Export UserForms Between VBE and VB4.0

Last reviewed: March 13, 1998
Article ID: Q159537
The information in this article applies to:
  • Microsoft Excel 97 for Windows
  • Microsoft Visual Basic, version 4.0

SYMPTOMS

In Microsoft Excel 97, if you try to import a Form that was created in Microsoft Visual Basic version 4.0, you will receive the following error:

   The form class contained in <path to the form> is not supported in VBE.
   The file can't be loaded.

and you are unable to import the Form.

In Microsoft Visual Basic version 4.0, if you try to import a UserForm that was created in Microsoft Excel 97, you will receive the following error:

   Version number missing or invalid; Visual Basic 4.0 assumed.

followed by the error:

   Errors during load. Refer to '<path to the UserForm>\Myform.log' for
   details.

followed by the error:

   '<path to the UserForm>' could not be loaded.

and you are unable to import the UserForm.

CAUSE

You cannot import/export UserForms/Forms between Microsoft Excel 97 and Microsoft Visual Basic version 4.0.

STATUS

This is by design of the products listed at the beginning of this article.

MORE INFORMATION

Even though you cannot import/export Microsoft Excel 97 UserForms with Microsoft Visual Basic 4.0, you can import/export UserForms between different Microsoft Excel 97 projects.

How to Export a UserForm From Your Project

  1. Activate the UserForm in your project.

  2. On the File menu, click Export File.

  3. In the Export File dialog box, select a destination folder for the .frm file, and type a name for your file in the File Name text box.

  4. Click Save.

How to Import a UserForm From Another Project

  1. In the Project Explorer window, select the Project that is going to import the UserForm you previously saved.

  2. On the File menu, click Import File.

  3. Locate and select the .frm file you want to import.

  4. Click Open.

REFERENCES

For more information about importing and exporting UserForms, click the Index tab in Microsoft Excel 97 Visual Basic Help, type the following text

   import

and then double-click the selected text to go to the "Import File and Export File Commands (File Menu)" topic.


Additional query words: XL97 8.00
Keywords : kberrmsg kbprg xlvbainfo xlui
Version : WINDOWS:97
Platform : WINDOWS


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: March 13, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.