ICI logo


Intersystem Concepts, Inc.



VB6 Fatal Error C1001

Your development is going smoothly, runs fine in the IDE, so you compile it into an EXE, and get the following dreaded message:

VB6 employs part of the same compilers used for C/C++ programs, and that's what's reporting this error.

We first encountered it when changing our program's compile option from "No Optimization" to "Optimize for Fast Code". As you may know, optimizing for fast code produces larger programs, so we suspected this fatal error was related to the module1.bas exceeding some capacity limit.

The solution: we created a module2.bas and moved portions of the module1.bas to it. No more fatal error.

When the trouble began, our module1.bas contained roughly 50,000 lines of VB6 code. It is likely that not only is the code length of significance, but also its complexity.

We subsequently learned that even code that is not used, such as functions that are never called, can cause this problem. If you keep old versions of procedures around for reference, you might be able to avoid error C1001 by removing them.


Other VB tips