I'm trying to write a little program that will count the number of lines in any sub, function, etc... but I can't seem to figure out the CountOfLines portion. Right now, it's giving me a count of ALL of the lines of code. Here's what I've got so far... Sub TEST() Dim objVBE As VBIDE.VBE Dim objProc As String Dim lngSL As Long, lngSC As Long, lngEL As Long, lngEC As Long Set objVBE = ThisDrawing.Application.VBE Debug.Print objVBE.ActiveCodePane.CodeModule objVBE.ActiveCodePane.GetSelection lngSL, lngSC, lngEL, lngEC objProc = objVBE.ActiveCodePane.CodeModule.ProcOfLine(lngSL, vbext_pk_Get) Debug.Print objProc Debug.Print objVBE.ActiveCodePane.CodeModule.CountOfLines Set objVBE = Nothing End Sub Thanks in advance!