PRB: "Error loading from file" Error Message When Running .Exe

Last reviewed: February 26, 1996
Article ID: Q138527
The information in this article applies to:
  • Standard, Professional, and Enterprise Editions of Microsoft Visual Basic, 32-bit only, for Windows, version 4.0

SYMPTOMS

If you receive the error message "Error loading from file," it may mean that a control used in the Visual Basic project is not correctly registered on the system on which the project is being run or that the control is missing from that system.

Under the same circumstances, the 16-Bit edition of Visual Basic gives the message "Can't load (or register) custom control:" followed by the name of the control that is missing.

RESOLUTION

If the message "Error loading from file" is received, ensure that all the OCX controls required by the project are present on the system and that they are correctly registered.

MORE INFORMATION

Steps to Reproduce Behavior

  1. Start a new project in the 32-bit edition of Visual Basic. Form1 is created by default.

  2. Add the common dialog custom control to the form.

  3. On the File menu, click Make EXE.

  4. Locate the Comdlg32.ocx file in the Windows\System32 directory, and copy it to a floppy disk. Then delete the file from the system. (On Windows 95, renaming the file is not sufficient because the registry appears to keep track of renaming and make appropriate changes in the registry.)

  5. Locate and run the executable program. The error message "Error Loading from File" appears. After this test, remember to copy Comdlg32.ocx back from the floppy disk to the Windows\System32 directory.


Additional reference words: 4.00 VBX Custom Control vb4win vb432
KBCategory: kbprg kbprb kberrmsg
KBSubcategory: PrgCtrlsCus


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: February 26, 1996
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.