Table of contents
TOC
折叠目录
展开目录

MacroError.Arguments 属性 (访问)MacroError.Arguments Property (Access)

office 365 dev account|上次更新日期: 2018/3/13
|
2 参与人员

获取指定发生错误时正在执行的宏操作的参数。只读的字符串Gets the arguments specified for the macro action that was executing when an error occurred. Read-only String.

语法Syntax

表达式参数expression. Arguments

表达式_一个表示MacroError对象的变量。_expression A variable that represents a MacroError object.

注解Remarks

宏错误时,错误的信息存储在MacroError对象。如果您未曾使用OnError操作来禁止显示错误消息,宏将停止,错误信息将显示在标准错误消息。但是,如果您使用OnError操作来禁止显示错误消息,您可以使用条件或自定义错误消息中的MacroError对象中存储的信息。When an error occurs in a macro, information about the error is stored in the MacroError object. If you have not used the OnError action to suppress error messages, the macro stops and the error information is displayed in a standard error message. However, if you have used the OnError action to suppress error messages, you may want to use the information stored in the MacroError object in a condition or a custom error message.

错误已得到处理后, MacroError对象中的信息是过时的因此它是一个好主意,以清除使用ClearMacroError操作的对象。这会将MacroError对象中的错误号重置回零,并清除存储在该对象,如错误说明、 宏名、 操作名称、 条件和参数中的错误有关的任何其他信息。这种方式,您可以检查MacroError对象以后再看到另一个错误发生。After an error has been handled, the information in the MacroError object is out of date, so it is a good idea to clear the object using the ClearMacroError action. This resets the error number in the MacroError object back to zero, and clears any other information about the error that is stored in the object, such as the error description, macro name, action name, condition, and arguments. This way, you can inspect the MacroError object again later to see if another error has occurred.

另请参阅See also

概念Concepts

MacroError 对象MacroError Object

© 2018 Microsoft