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

To add to Jim's answer:
The code you write in the VBE is the only part visible/accessible to you.
However, there are a further 2 (or 3?) stages before the code actually gets
executed. Depending on what you done and if the code has ever been compiled,
your file may contain this code in various stages of compilation stored with
it. Continual editing can leave bits of this intermediate code laying around
in the file, which leads to bloat.
Copying the text of the code out, either manually or with something like
CodeCleaner, and pasting back into a new module, removes all the previous
(partly) compiled code.

Apart from keeping the file small and reliable, this can be useful in
certain situations when you want/need to workaround compilation problems, as
the code then has never been compiled. But that is another subject
altogether.

NickHK

wrote in message
oups.com...
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