The ProcCountLines property returns a Long value containing the number of lines in a specified procedure in a standard module or a class module. The procedure begins with any comments and compilation constants that immediately precede the procedure definition, denoted by one of the following:
Setting
object.ProcCountLines(procname, prockind)
The ProcCountLines property uses the following settings.
Setting | Description | |
---|---|---|
object | A Module object. | |
procname | A string expression that evaluates to the name of a procedure in the module. | |
prockind | An intrinsic constant that specifies the type of procedure. The constant may be one of the following values. | |
Constant | Description | |
vbext_pk_Get | A Property Get procedure. | |
vbext_pk_Let | A Property Let procedure. | |
vbext_pk_Proc | A Sub or Function procedure. | |
vbext_pk_Set | A Property Set procedure. |
The ProcCountLines property is available only by using Visual Basic and is read-only.
Remarks
The ProcCountLines property returns the number of lines in a procedure, beginning with the line returned by the ProcStartLine property and ending with the line that ends the procedure. The procedure may be ended with End Sub
, End Function
, or End Property
.
Note The ProcCountLines property treats Sub and Function procedures similarly, but distinguishes between each type of Property procedure.