Is there an easy to find out the total number of Source Lines of Code in a project.
Thanks
Printable View
Is there an easy to find out the total number of Source Lines of Code in a project.
Thanks
you could write an Add-in that iterates over all CodeModule Objects of your project and adds the CountOfLines property of all those modules.
sample:
Dim p As VBComponent
Dim lCount As Long
For Each p In gVBInstance.VBProjects.StartProject.VBComponents
lCount = lCount + p.CodeModule.CountOfLines
Next p
msgBox "Total: " & lCount
the disadvantage: blank lines are counted as source lines and in multline statements (_) all lines are counted.