生成exe 后提示运行的错误'5',无效的过程调用或参数?

Private Sub cmddelete_Click()
Dim a As Integer
If renzheng() Then
If Adodc1.Recordset.RecordCount = 0 Then
MsgBox "暂时没有消费记录!"
Exit Sub
End If
a = MsgBox("删除后无法恢复!确认要删除该记录吗?", vbYesNo + vbInformation, "警告信息")
If a = vbYes Then
Adodc1.Recordset.Delete
Adodc1.Recordset.UpdateBatch

If Adodc1.Recordset.RecordCount = 0 Then
MsgBox "暂时没有消费记录!"
Exit Sub
End If
If Adodc1.Recordset.EOF Then
Adodc1.Recordset.MoveLast
Else
Adodc1.Recordset.MoveNext
If Adodc1.Recordset.EOF Then
Adodc1.Recordset.MoveLast
End If
End If
MsgBox "恭喜您!删除成功!"
End If
Else
MsgBox "身份认证失败,密码错误!"
End If
End Sub



函数式编程
浏览 114回答 2
2回答

缥缈止盈

你应该在调试状态看一下出错在哪 一行别直接编译成EXE文件后执行天知道出错在什么地方

互换的青春

这里可只有一个过程renzheng() ,检查一个是不是定义了,是不是函数,或者是否需要参数。
打开App,查看更多内容
随时随地看视频慕课网APP