Members

Technology Zones

Articles

Hosted By

MaximumASP

Info

Rated
Read 13,306 times

Related Categories

Evaluating VBE's Code Line Counts

The VBE object model offers a great way to manipulate the Visual
Basic IDE and its components. With it, you can create add-ins
that automate many of the mundane tasks you face as a developer.
As you may know, in this object model each component in a
project-form, module, class, property page, etc. has an associated
CodeModule that contains the code behind the component. However,
when you use any of the CodeModule's code manipulation properties
or methods, keep in mind that this object includes all lines in
its counts, including procedure and event declarations as well
as carriage returns.

So, if a standard module contained:

Private Sub AnotherTestCode()
' Comments make the code
' more readable in every way.

End Sub

then the CodeModule.CountOfLines property would return 6-four
code lines, and two carriage returns.

© 2001 Element K Journals, a division of Element K Press LLC ("Element K"). Element K and the Element K logo are trademarks of Element K LLC

Comments