The following example uses the CodeModule and CountOfLines properties to return the number of lines in a particular code module.
Debug.Print Application.VBE.ActiveVBProject.VBComponents(6).CodeModule.CountOfLines