开发者

Hide error message in vb6

Is theres a way to hide a vb6 error? I have a program that prompt an error but everything goes fine. Any help will be highly appreciated. Thanks. UPD the code:

Set WshShell = CreateObject("WScript.Shell") 'passing the values to program2 
strCommand = "开发者_StackOverflow""" & App.Path & "\Prog2.exe """ & strArgs(0) & ";" & Trim$(.cFileName) & ";" & strArgs(1) WshShell.Run strCommand


you may suppress exception raising in vb in the following way:

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


after the declaration of your function/sub put

on error goto error_filter

'your code is here'

before the ending of your sub/function put this

error_filter:

if err.description = (the error description you want to eliminate) then

exit sub

end if

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜