View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
John.Greenan John.Greenan is offline
external usenet poster
 
Posts: 175
Default What is a VBA Cleaner and why using it?

Here's an example : declare a series of module level variable - say
private mstrmyString1 as string
....
private mstrmyString100 as string

Now, this will make the human readable code larger - there are now 100 lines
of code. Compile this code and you will see that the workbook gains in size
as the compiled code is stored in the book. Now, delete the variables and
recompile. You will not get the file back to the original size. Why?
Because the compiled representation of the declared variables will not be
removed. Hence the "bloat". I am not a fan of code cleaner but I do
recommend stripping all code and worksheets to a new workbook before
releasing to production - that's basically what code cleaner does but i
prefer to do it manually.

Hope that helps.

--
http://www.alignment-systems.com


" wrote:

Dear All,

Please, could anybody tell me some more details about the VBA Cleaner?
The fact a program like VBA Cleaner exists doesn't make sense to me.

The only explanation I get is the following:

During the process of creating VBA programs a lot of junk code builds
up in your files. If you don't clean your files periodically you will
begin to experience strange problems caused by this extra baggage.
Cleaning a project involves exporting the contents of all its
VBComponents to text files, deleting the components and then importing
the components back from the text files.

How do I have to imagine this "junk code"? I'm very tidy writing my
code.

Regards,

Bart