What is compiling and should I do it?

D

dim

Hi folks,

My program consists of 197 .xls files in 5 sub-folders. 134 of these files
contain programming and macros.

The different files interact with each other in various ways, with different
macros opening and closing other files at different times, and data being
added to, removed from, or used by various files by macros when under the
control of various other files.

Anyway, In the Debug menu of the VBA Editor I see the 'Compile VBA Project'
command. My understanding of compiling is that it compresses the code files
to remove various elements used when creating the program, and make the
program ready for release. Is this correct?

Do I need to compile my program before release, and if so, do I need to
compile each .xls file individually?

Thanks.
 
R

RB Smissaert

That sounds like a very complex project!
I would do a compile before every save, if there was any substantial code
change.
This will then pick any problems and avoid a save with these problems left
unfixed.
Also make sure that every module (normal module, class module and form
module) has Option Explicit at the top.

RBS
 
D

dim

Thanks folks,

That site pretty much explained it. I'll run the compile manually for each
of my files just in case.

Yeah, its the most complex Excel based program I've ever come across! lol
Unfortunately this is the final Exce build. For the next version I'm moving
over to C++.

Can you explain the Option Exlicit some more please, I've never used it?
 
R

RB Smissaert

Can you explain the Option Exlicit some more please, I've never used it?

All explained nicely in the VBA help.
If you do in the VBE:
Tools, Options, Editor and tick Require variable declaration then Option
Explicit will always be automatically added for you when you add a new
module.

RBS
 

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