📄 vbs586.htm
字号:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"><HTML><HEAD><TITLE>On Error Statement</TITLE>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso8859-1">
<META NAME="MS.LOCALE" CONTENT="EN-US">
<META NAME="PRODUCT" CONTENT="Visual Basic Scripting Edition">
<META NAME="TECHNOLOGY" CONTENT="SCRIPTING">
<META NAME="CATEGORY" CONTENT="Language Reference">
<META NAME="Keywords" CONTENT="On,GoTo,Next,Error statement ,go to,Resume,On Error statement,Resume Next,error handling,errors trapping,conditional execution,branching conditional,execution conditional,run-time errors handling,errors,branching,execution,run-time errors"><META NAME="Description" CONTENT="On Error Statement"></HEAD><BODY BGCOLOR=FFFFFF LINK=#0033CC>
<!--TOOLBAR_START-->
<!--TOOLBAR_EXEMPT-->
<!--TOOLBAR_END-->
<FONT FACE="Verdana, Arial, Helvetica" SIZE=2>
<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100%><TR VALIGN=TOP><TD WIDTH=360>
<FONT SIZE=1 COLOR=#660033>Microsoft® Visual Basic® Scripting Edition</FONT><BR>
<FONT SIZE=5 COLOR=#660033><B>On Error Statement</B></FONT>
</TD>
<TD ALIGN=RIGHT>
<FONT SIZE=2> <A HREF="vbstoc.htm">Language Reference</A> <BR>
<A HREF="vbs16.htm">Version 1</A> <P></FONT>
</TD></TR>
</TABLE>
<FONT SIZE=2><p><A HREF="vbs587.htm">See Also</A></FONT>
<HR noshade SIZE=1>
<H5>Description</H5>
<BLOCKQUOTE>Enables error-handling.</BLOCKQUOTE>
<H5>Syntax</H5>
<BLOCKQUOTE><b>On Error</b> <b>Resume Next</b></BLOCKQUOTE>
<H5>Remarks</H5>
<BLOCKQUOTE>If you don't use an <b>On Error Resume Next</b> statement, any <A HREF="vbs0.htm#defRTErr">run-time error</A> that occurs is fatal; that is, an error message is displayed and execution stops.<P>
<b>On Error Resume Next</b> causes execution to continue with the statement immediately following the statement that caused the run-time error, or with the statement immediately following the most recent call out of the procedure containing the <b>On Error Resume Next</b> statement. This allows execution to continue despite a run-time error. You can then build the error-handling routine inline within the procedure. An <b>On Error Resume Next </b>statement becomes inactive when another procedure is called, so you should execute an <b>On Error Resume Next</b> statement in each called routine if you want inline error handling within that routine.</BLOCKQUOTE>
<hr noshade size=1>
<p align=center><em><a href="../../common/colegal.htm">© 1997 by Microsoft Corporation. All rights reserved.</a></em></p>
</FONT></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -