Kenji,
The code below requires a reference to MS VBA extensibility, and will report
how many lines are in the activeworkbook.
HTH,
Bernie
MS Excel MVP
Sub CountLines()
Dim LineCount As Integer
Dim myVBAs As VBComponents
Dim myVBA As VBComponent
Set myVBAs = ActiveWorkbook.VBProject.VBComponents
For Each myVBA In myVBAs
LineCount = LineCount + myVBA.CodeModule.CountOfLines
Next
MsgBox "Lines of code for the activeworkbook is " & LineCount
End Sub