⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 vbs396.htm

📁 VBScript 是一种脚本语言
💻 HTM
字号:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"><HTML><HEAD><TITLE>Err Object</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="Err object,Error statement ,errors,objects,simulating errors,errors simulating"><META NAME="Description" CONTENT="Err Object"></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&#174; Visual Basic&#174; Scripting Edition</FONT><BR>
<FONT SIZE=5 COLOR=#660033><B>Err Object</B></FONT>

</TD>
<TD ALIGN=RIGHT>
<FONT SIZE=2>&nbsp;<A HREF="vbstoc.htm">Language&nbsp;Reference</A>&nbsp;<BR>
<A HREF="vbs16.htm">Version&nbsp;1</A>&nbsp;<P></FONT>

</TD></TR>
</TABLE>
<FONT SIZE=2><P>
<A HREF="vbs397.htm">See Also</A>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<A HREF="vbs399.htm">Properties</A>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<A HREF="vbs398.htm">Methods</A></FONT>
<hr noshade size=1>

<H5>Description</H5>
<BLOCKQUOTE>Contains information about <A HREF="vbs0.htm#defRTErr">run-time errors</A>. Accepts the <b>Raise</b> and <b>Clear </b>methods for generating and clearing run-time errors.</BLOCKQUOTE>

<H5>Syntax</H5>
<BLOCKQUOTE><b>Err</b>[<b>.</b>{<i>property</i> | <i>method</i>}]</BLOCKQUOTE>

<H5>Remarks</H5>
<BLOCKQUOTE>The properties of the <b>Err</b> object are set by the generator of an error &#151; Visual Basic, an Automation object, or the VBScript programmer.<P>
The default property of the <b>Err </b>object is <b>Number</b>. <b>Err.Number</b> contains an integer and can be used by an <A HREF="vbs0.htm#defOLEAutomationObject">Automation object</A> to return an <A HREF="vbs0.htm#defSCode">SCODE</A>.<P>
When a run-time error occurs, the properties of the <b>Err</b> object are filled with information that uniquely identifies the error and information that can be used to handle it. To generate a run-time error in your code, use the <b>Raise </b>method.<P>
The <b>Err</b> object's properties are reset to zero or zero-length strings (&quot;&quot;) after an <b>On Error Resume</b> <b>Next</b> statement and after an <b>Exit Sub</b> or <b>Exit Function</b> statement within an error-handling routine. The <b>Clear</b> method can be used to explicitly reset <b>Err</b>.<P>The <b>Err </b>object is an intrinsic object with global <A HREF="vbs0.htm#defScoping">scope</A>  &#151; there is no need to create an instance of it in your code.</BLOCKQUOTE>

<hr noshade size=1>
<p align=center><em><a href="../../common/colegal.htm">&copy; 1997 by Microsoft Corporation. All rights reserved.</a></em></p> 
</FONT></BODY></HTML>






















































































⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -