Too many modules?

K

kwiklearner

Is there a maximum number of modules/lines of codes for a VB project? I
started getting this error message all of a sudden?
Excel can not complete this task with available resources. Choose less
data or close other applications.
I have 9 modules in the VB project and a total of 850 lines of code.
 
C

Chip Pearson

I have 9 modules in the VB project and a total of 850 lines of

That is far below any limit VBA has. There is a maximum length of
a procedure (a few thousand lines, I think), and a maximum module
size (about 64K when exported to text).


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"kwiklearner"
in message
 
S

sybmathics

There is maximum to the number of variables.

What the VBA machine does is to first read and interpret your code and wen
it finds no obstructions is will run.
However, if you have a routine where you redefine a variable during loops in
your code and also create new variables, the machine may get overloaded.
You should try putting more variables in an array-variable.

With an array you only haveone variable where you can store unlimited
values.

HTH,

Sybolt
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top