1)假設
Private Utility As New clsUtyUtility
'
Private Sub cmdRefresh_Click()
...
On Error GoTo cmdRefresh_Click_EH
...
Dim strErrorLog As String
Dim strProcess As String
strProcess = Name & "." & "Private Sub cmdRefresh_Click()"
strErrorLog = "應用程式: " & App.EXEName & vbCrLf & _
"版 本: " & App.Major & "." & App.Minor & "." & App.Revision & vbCrLf & _
"錯誤位置: " & strProcess & vbCrLf & _
"錯誤代碼: " & Err.Number & vbCrLf & _
"錯誤敘述: " & Err.Description & vbCrLf & _
"錯誤列數: " & Erl()
Utility.ErrorLog strErrorLog
Exit Sub
End Sub
'
上述行號部分是使用另一程式在整個專案完成時再加入。
'
2)效果
上述的strProcess = Name & "." & "Private Sub cmdRefresh_Click()" 的"Private Sub cmdRefresh_Click()" 是以人工方式輸入,請問有無辦法自動偵測所在位置的程序或函數的名稱。
'
'
'
------------------
SPENCER YANG
2000/04/09