Deftype 语句必须先于声明Deftype statements must precede declarations

Deftype 语句包含 DefIntDefDblDefCur 等。Deftype statements include DefInt, DefDbl, DefCur, and so on. 此错误的原因和解决方案如下:This error has the following causes and solutions:

  • 变量声明模块级别Def_类型_语句之前。A variable declaration precedes a Deftype statement at module level.

    移动 Deftype 语句,使其位于所有变量声明前面。Move the Deftype statement to precede all variable declarations.

  • Deftype 语句出现在过程中。A Deftype statement appears in a procedure.

    Deftype 语句移动到模块级别,并位于所有变量声明前面。Move the Deftype statement to module level, preceding all variable declarations.

有关其他信息,选择有问题的项并按 F1(在 Windows 中)或 HELP(在 Macintosh 上)。For additional information, select the item in question and press F1 (in Windows) or HELP (on the Macintosh).

支持和反馈Support and feedback

有关于 Office VBA 或本文档的疑问或反馈?Have questions or feedback about Office VBA or this documentation? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.