The ProcStartLine property returns a Long value identifying the line at which a specified procedure begins 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.ProcStartLine(procname, prockind)
The ProcStartLine 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 ProcStartLine property is available only by using Visual Basic and is read-only.
Remarks
The ProcStartLine property returns the number of the line on which the specified procedure begins. The beginning of the procedure may include comments or compilation constants that precede the procedure definition.
To determine the line on which the procedure definition begins, use the ProcBodyLine property. This property returns the number of the line that begins with a Sub, Function, Property Get, Property Let, or Property Set statement.
The ProcStartLine and ProcBodyLine properties can have the same value, if the procedure definition is the first line of the procedure. If the procedure definition isn't the first line of the procedure, the ProcBodyLine property will have a greater value than the ProcStartLine property.
Notes