I downloaded that "cleaner" program, and tried it. Unfortunately, it seems
that it only "cleans" the VBA code that's actually in modules. The problem
is that the vast majority of my code is actually in the code behind
individual sheets.
In fact, running that "cleaner" program only saved me a few megs off of a
150MB file. Which isn't enough to even make a difference, unfortunately.
Is there a way (manual or automatic, although with over 200 worksheets I'd
prefer automatic) that I can "clean" up the garbage associated with all of
the worksheets' VBA code?
Thanks!
-Scott
"Keith Willshaw" wrote in message
...
"Scott Lyon" <scott.lyonNOSPAM_at__NOSPAMrapistan.comNOSPAM wrote in
message ...
I've been working on an Application (in Excel 2002) for awhile. Lately,
it's
been growing out of control. To give you an idea, when I save the thing
(in
Excel 2002/XP format, we won't even TALK about what happens if I save it
in
Excel 97 format), it's pushing 150MB.
At this point, the application consists of the following:
- About 110 worksheets - each with two TabStrip controls (with anywhere
from
5 to 30 tabs), and approximately 4-5 buttons, as well as two small
images
- Each worksheet has about 400 lines of VBA code (although about 150
lines
of that is temporary code, commented out, and will be gone when this
goes
to
production).
- Two main (shared/common) VBA modules that have about 4000 and 1200
lines
(respectively) of VBA code
And that's about it... But somehow it's ballooned up to 150MB, and is
starting to give my computer fits as I work on it. To add insult to
injury,
realistically, there will probably (when all is said and done) be over
200
worksheets (each with probably around 200-300 lines of code each)
Now, it's way too late to rewrite this in a better way (and for that
matter,
although the code is similar on each of the worksheets, it's unique
enough
that I cannot just call a shared function for most of it). Is there any
way
I can get this thing to shrink back down to a managable size?
I wouldn't mind if it was as much as 50-60MB, once I've got all 200
worksheets. But that it's above 150MB already, and I'm barely half-way
there, has me quite concerned.
Can anyone offer ideas/suggestions?
Dowload and run a VBA Codecleaner such as that on the
appspro site. Each time you edit a VBA file it gets bigger as
VBA cant seem to recover used space. This utility will recover
that space and lets you strip comments and blank lines
from code (useful for shipping externallu but keep a copy)
http://www.appspro.com/utilities/Cleaner.asp
Keith