这是隐藏vb6错误的方法吗?我有一个程序,提示错误,但一切都很顺利。任何帮助将受到高度赞赏。谢谢。 UPD 代码:
Set WshShell = CreateObject("WScript.Shell") 'passing the values to program2
strCommand = """" & App.Path & "\Prog2.exe """ & strArgs(0) & ";" & Trim$(.cFileName) & ";" & strArgs(1) WshShell.Run strCommand
答案 0 :(得分:0)
您可以通过以下方式抑制vb中的异常提升:
on error resume next
doSomeDangerousStuff
if err.Number <> 0 then
'here is some optional error handling code
MsgBox "Exception occured: " & Err.Description
end if
on error goto 0
答案 1 :(得分:0)
出错goto error_filter
'你的代码在这里'
在你的子/函数结束之前把这个
error_filter:
如果err.description =(你要消除的错误描述)那么
退出子
结束如果