W
WHA
See also http://www.dailydoseofexcel.com/archives/2004/10/13/module-size-limits/
I was interested in knowing whether a specific code module was over
this limit. This was the code module for my main CRUD form. This form
has 16 command buttons (including Edit/Delete/Create for each of five
properties), five combo boxes, two radio buttons, a checkbox and some
labels. Also some empty frames, height 1, used as dividers. There are
1330 lines of code but most of these are commented out.
Per the comments at the above site, I tried
?
len(application.VBE.ActiveCodePane.CodeModule.Lines(1,application.VBE.ActiveCodePane.CodeModule.CountOfLines))/
1000
in the Immediate window and got 47.847. (Note for posterity: I first
had to go to Tools/Macro/Security/Trusted Publishers/Trust access to
VB Project.) Is that bad? Is 47.847 the result of compiling the code?
Or, instead, can that number be affected by the user opening/closing/
using the Userform?
Thanks in advance, WHA
Background: I am building a VBA-based tool in Excel 2003 on Windows
XP. I'm having some kind of memory leak problem: I get "Out of
memory," with no mention of Error 7. This can occur simply when I am
in the VBE without any of my code running. Also, after the error
occurs, I am unable to save the workbook, even to a local drive. This
is the third of four posts with questions about what the source of
this error might be.
I was interested in knowing whether a specific code module was over
this limit. This was the code module for my main CRUD form. This form
has 16 command buttons (including Edit/Delete/Create for each of five
properties), five combo boxes, two radio buttons, a checkbox and some
labels. Also some empty frames, height 1, used as dividers. There are
1330 lines of code but most of these are commented out.
Per the comments at the above site, I tried
?
len(application.VBE.ActiveCodePane.CodeModule.Lines(1,application.VBE.ActiveCodePane.CodeModule.CountOfLines))/
1000
in the Immediate window and got 47.847. (Note for posterity: I first
had to go to Tools/Macro/Security/Trusted Publishers/Trust access to
VB Project.) Is that bad? Is 47.847 the result of compiling the code?
Or, instead, can that number be affected by the user opening/closing/
using the Userform?
Thanks in advance, WHA
Background: I am building a VBA-based tool in Excel 2003 on Windows
XP. I'm having some kind of memory leak problem: I get "Out of
memory," with no mention of Error 7. This can occur simply when I am
in the VBE without any of my code running. Also, after the error
occurs, I am unable to save the workbook, even to a local drive. This
is the third of four posts with questions about what the source of
this error might be.