VBA - lines of code/metric analysis?
Hey all,
I'm working with VBA .vbp files that are used in a third-party software package (i.e. not office). The third-party software package allows you to create custom rules, exports, manipulation, etc from a VBA standpoint.
For each VBA project, there is only one file created that is simply .VBP. Does anyone know of any tools that can analyze these .VBP for lines-of-code, number of modules, and other metrics?
Simply lines-of-code would be a good start, prefer something that is command-line oriented that has a consistent output to file or to screen that can be redirected to file.
Thanky,
-D
Re: VBA - lines of code/metric analysis?
Welcome to the Forums.
VBA doesnt have vbp files. Visual Basic does. VBA is the IDE code editor
behind most Office suite products.
Are your vbp projects files with other related frm, frx, bas, cls files?
Re: VBA - lines of code/metric analysis?
The editor shows both normal (.bas) modules and class modules that can either be created or imported, but the actual file saved is a single <project>.vbp file with no related .cls, .bas, or .frm, .frx files.
I've talked to the thirdparty software provider, but they are more interested in the product then development support ;-)
Now that you mentioned it, the editor does say 'visual basic 6.3', but is marketed/advertised as 'Visual Basic for Applications' to extend the existing platform.
Sorry if I have posted to the incorrect forum. The single <project>.vbp file can not be loaded with VB6 or VisualStudio.NET, leaving me wondering where I should ask about this type of 'integrated vb for application' development environment.
Re: VBA - lines of code/metric analysis?
No, I think its in the right place. VB 6.3 is actually VBA.
What does this "Add-In" work with?
Also, if its just the line count you need to get for starters then we could
open the files as text files and read in the lines for counting.
1 Attachment(s)
Re: VBA - lines of code/metric analysis?
I would rather avoid naming the thirdparty software, but it is workflow-related where you can exercise rules based on Events from within their software. These rules can be written in VBA, and I've been writing a lot and need to find a way to put metrics to these files.
Attached hopefully is a sample file in zip format (which contains linetest.vbp). There should be visible the main class called 'ThisDocument', as well as a Module1 .bas and a Class1 .cls all within that single file.
Like I mentioned, I'm stumped right now as to how to simply get lines-of-code out of these. I have 20 some-odd of these project files, so hopefully can locate an easy solution :)
-D
Re: VBA - lines of code/metric analysis?
I cant open it, but I did use notepad. It looks like a Word Add-In. I cant do anything without the
modules and classes. Sorry, I dont know what else to tell you other then see if the company has a
support or user groups.
I also suppose the vba project is unviewable from within Words VBA IDE?