Compile VBAProject under Debug menu in VBA

celltician

New Member
Joined
Feb 26, 2002
Messages
9
Does it do anything?? I wrote a short VBA program and hit Compile VBAProject. It did something very fast but gave no indication of what it did???
I looked up 'Compile' in help with NO results.

What is it for???

Thank you.
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
I believe compiling just checks to verify that your syntax is correct and that there are no obvious errors (DO statement without a LOOP ending, for example).

Regards,
 
Upvote 0
BTW

I use this as Mark says and just help if im miss something also step through in test stages can be cool.

Short scripts are not so painful, 100 lines of complex code and 3 cases doing bits with loops all give agro to the programmer this can help.. I dont use VBA Checker software thats about, no reason just dont..

HTH
 
Upvote 0
Well, first message in a while, don't know when I'll be back again...

Just to let you know, Compiling projects actually has some effects in the program. Whenever the macro is run, VB compiles the macro to "translate" it into machine code, (Well, something very similar to this). The truth is that a VB Project has three (As far as I remember...) stages, two of them are "P" code and "X" code (This is just by memory from an article I read a while, so, I may be wrong with the letters). When you compile, VB translates from one to the other, which makes it run much faster.

So, in big projects, it's a good idea to compile BEFORE saving, that way the program has ALREADY translated the code, and there's no need to translate it at the beginning, which results in faster loading times. It has no "visible" effect on small programs.
 
Upvote 0
I find myself with the need of understanding the 'compile vbaproject' option.
As I just executed this and it doubled the size of my workbook. From about 500k to 1.07mb.
Is this normal. Or is there something else?????

Thanks in advance,
-D
 
Upvote 0
I find myself with the need of understanding the 'compile vbaproject' option.
As I just executed this and it doubled the size of my workbook. From about 500k to 1.07mb.
Is this normal. Or is there something else?????

Thanks in advance,
-D

Back from the dead...
Will Compiling speed up the running of the code?
 
Upvote 0

Forum statistics

Threads
1,213,497
Messages
6,114,002
Members
448,543
Latest member
MartinLarkin

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top