Subs are contained within the QB64 main code module. When the compile happened, the code would not run because no memory for the code.
I'm not sure why the subroutines are going into the main module, in QB64, if they were separate subroutines in QB45.
One thing to keep in mind is that QB64's IDE indeed shows all of the subroutines following the main module, without mandating that you press the F2 key to go to each sub separately. Using MS QB, you got the impression that subroutines were in some totally different location. However, those subs are still subs, in QB64, when the program is compiled. (As far as I know. Steve or others will soon correct me if I'm making a bad assumption here!)
Is there a way to run subs in QB64 so they are not added to the main module so the main will execute without not enough memory error?
The memory error, I have to believe, is completely unrelated to how the IDE shows the subroutines. Could it be some undimensioned array, or using the same variable name for an array and a single variable, or other oddities like that? These error notifications come from the C++ compiler used in QB64, and they can be pretty obtuse.
I did notice, when I started using QB64, that in some ways, the QB7.1 I was using previously was more forgiving. In multiple programs, if I was trying to be too tricky with my code before, QB64 would flag an error. Luckily for me, this happened on relatively short programs that I managed to fix with minimal effort. Even silly things, like where to use parentheses in a statement, managed to create problems for me.
Next thing you can expect is that people will want to see the code, to find the problem. But I'm betting on some dumb syntax problem, which causes this "memory error" notification.