一个名为MZ-Tools的插件有此功能:
---------------------------------------------------------------------------------
Line Numbering
This feature allows you add or remove line numbers to the source code of a procedure, file, project or project group, depending on the used menu or context menu of the Project Explorer. Line numbering is useful if you use the undocumented Erl function in your error handlers to know the line that caused the error:
Private Sub Form_Load()
10 On Error GoTo Proc_error
20 Debug.Print 1 / 1
30 Debug.Print 1 / 0
40 Exit Sub
Proc_error:
50 MsgBox "Error " & Err.Description & " in line " & Erl & " of Form_Load"
End Sub
---------------------------------------------------------------------------------
详见http://www.mztools.com/