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 of the compiler.
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.