![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Feb 2002
Location: Wisconsin
Posts: 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. |
|
|
|
|
|
#2 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Winnipeg
Posts: 2,330
|
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,
__________________
Barrie Davidson "You're only given a little spark of madness. You mustn't lose it." - Robin Williams |
|
|
|
|
|
#3 |
|
Board Regular
Join Date: Feb 2002
Posts: 3,064
|
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
__________________
Free Excel based Web Toolbar available here. Jack in the UK J & R Excel Solutions "making Excel work for you" |
|
|
|
|
|
#4 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Bogota, Colombia
Posts: 11,927
|
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. |
|
|
|
|
|
#5 |
|
Board Regular
Join Date: Mar 2002
Posts: 119
|
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 |
|
|
|
|
|
#6 | |
|
Board Regular
Join Date: Sep 2011
Location: India
Posts: 147
|
Quote:
Will Compiling speed up the running of the code? |
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|