VBE_Extras catch-up #3: Project statistics
- John
- 2 days ago
- 2 min read
When I first made VBE_Extras available for download, it contained a whole load of functionality that I never wrote blog posts about. I'm now setting that right for a few of the core areas of that functionality.
Ever wanted to know:
How many procedure or properties are there in a VBA Project (or in a single Module of it)?
How many code lines there are in a VBA Project (or in a single Module of it)?
How many comment lines there are in a VBA Project (or in a single Module of it)?
How many blank lines there are in a VBA Project (or in a single Module of it)?
Of those lines, how many are declaration lines?
Does every Module have Option Explicit present in it?
Then the Project Stats command (in the Other Tools sub-menu) of VBE_Extras is for you!
As well as showing the absolute numbers, it will also show percentages (either by Project, Module or line type). And you can pivot / flip the orientation because, depending how many Modules there are in your Project, the data can be much clearer to read when oriented one way or the other.
Here's a couple of screenshots, one for each orientation ...


... clearly not a very interesting Project with hardly any code in it. But if I'm asked to take a look at a VBA Project that someone else has developed before me, this is always the first place I go, especially if that Project consists of many Modules.
You can also get a CSV direct from this dialog if, for example, you want to retain a snapshot of the data or share it with someone.
To get a much more granular view of the procedures and properties in a Module or in all of the Modules in a Project, see VBE_Extras catch-up #2: Listing all declarations.



Comments