Forum Discussion
rodsan724
Oct 29, 2021Brass Contributor
What does Compile VBA Project do anyway
There is an option in my Excel 2016 VBA project that says Compile VBA Project. What does this do?
3 Replies
Sort By
It does two things:
- It checks whether the code in the workbook is syntactically correct. If it finds an error, it will display an error message and highlight the problematic line. This is very useful, in particular before distributing a workbook to others.
- It stores the VBA code in a tokenized form that executes more efficiently than interpreting the text line by line. The VBE will also do this when you run a macro, but then for that macro only. Debug > Compile <projectname> will do it for all code in the workbook at once.