问题描述
Private Sub ButtonP_Click()
On Error GoTo Err_ButtonP_Click
Dim ThisForm As String
ThisForm = Me.Name
Exit_ButtonP_Click:
退出Sub
Err_ButtonP_Click:
Dim r As String,k As String, Message3 As String
r =" Sub ButtonP_Click发生以下意外错误,
CBF on" &安培; ThisForm& "。"
k = CRLF& CRLF& str $(Err)& : &安培;引用&错误$&引用
Message3 = r& k
MsgBox Message3,vbExclamation," Unexpected Error - " &安培; MyApp $&
",rev。 " &安培; MY_VERSION $
简历Exit_ButtonP_Click
结束子
我在frmAdministrativeActivities上遇到ButtonP问题。
以上的代码是运行OnClick的。
MouseDown代码没有问题。它运行正常。当然,所有的代码都会编译。
但是按下了ButtonP,我得到了无编号的错误。奇怪的是
,即使我删除所有ButtonP点击代码 - 错误
仍然会在点击ButtonP时持续存在。想法?
Private Sub ButtonP_Click()
On Error GoTo Err_ButtonP_Click
Dim ThisForm As String
ThisForm = Me.Name
Exit_ButtonP_Click:
Exit Sub
Err_ButtonP_Click:
Dim r As String, k As String, Message3 As String
r = "The following unexpected error occurred in Sub ButtonP_Click,
CBF on " & ThisForm & "."
k = CRLF & CRLF & str$(Err) & ": " & Quote & Error$ & Quote
Message3 = r & k
MsgBox Message3, vbExclamation, "Unexpected Error - " & MyApp$ &
", rev. " & MY_VERSION$
Resume Exit_ButtonP_Click
End Sub
I have a problem with ButtonP on frmAdministrativeActivities. The
above code is what''s run OnClick. There''s no problem with the
MouseDown code. It runs fine. Of course, all the code compiles.
But OnClick of ButtonP, I get the unnumbered error. Strange is
that even when I delete ALL the ButtonP click code - the error
still persists on click of ButtonP. Ideas?
这篇关于“发生意外错误” - A97的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!