如何制作“On Error” [英] How Can I Make "On Error"
本文介绍了如何制作“On Error”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好!我想做这个
如果........是错误那么
'做这个命令'
........是一些命令我不确定它将来会出错
总体来说
如果..........命令错误然后做...........
我怎样才能做到?
Hi Everyone!, I want to make this
" If ........ is ERROR Then
'Do This Command' "
........ is some command I don't sure it will error in the future
Overall
if .......... command is error then do ...........
How can I make it?
推荐答案
不要。
ON ERROR(谢天谢地)非常过时并且已被取代。
相反,请使用尝试...抓取 [ ^ ]
使用Try ... Catch ..最后! [ ^ ]就是你所需要的。
另外VB.Net - 异常处理 [ ^ ]应该为您提供指导。
Using Try... Catch..., Finally![^] is what you need.
In addition VB.Net - Exception Handling[^] should guide you.
这篇关于如何制作“On Error”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文