VBE 术语表VBE Glossary

Visual Basic 编辑器 (VBE) 术语词汇。Glossary of terms for Visual Basic Editor (VBE).

访问键access key

A key pressed while holding down the ALT key that allows the user to open a menu, carry out a command, select an object, or move to an object.A key pressed while holding down the ALT key that allows the user to open a menu, carry out a command, select an object, or move to an object. 例如,ALT+F 打开“文件”**** 菜单。For example, ALT+F opens the File menu.

ActiveX 控件ActiveX control

置于窗体上的对象,可实现或增强用户与应用程序的交互。An object that you place on a form to enable or enhance a user's interaction with an application. ActiveX 控件拥有事件并可合并到其他控件中。ActiveX Controls have events and can be incorporated into other controls. 这些控件的文件扩展名为 .ocx。These controls have an .ocx file name extension.

ActiveX 对象ActiveX object

通过自动化界面向其他应用程序或编程工具公开的对象。An object that is exposed to other applications or programming tools through Automation interfaces.

加载项add-in

将各功能添加到 Visual Basic 开发环境中的自定义工具。A customized tool that adds capabilities to the Visual Basic development environment.

ANSI 字符集ANSI Character Set

用键盘表示多达 256 个字符 (0-255) 的美国国家标准学会 (ANSI) 8 位字符集。American National Standards Institute (ANSI) 8-bit character set used to represent up to 256 characters (0-255) using your keyboard. 前 128 个字符 (0-127) 对应于标准美国键盘上的字母和符号。The first 128 characters (0-127) correspond to the letters and symbols on a standard U.S. keyboard. 后 128 个字符 (128-255) 表示特殊字符,如国际字母表中的字母、重音、货币符号和分数。The second 128 characters (128-255) represent special characters, such as letters in international alphabets, accents, currency symbols, and fractions.

应用程序application

作为单个程序一起工作的代码和视觉元素的集合。A collection of code and visual elements that work together as a single program. 开发人员可在开发环境内生成和运行应用程序,而用户通常在开发环境外将应用程序作为可执行的文件运行。Developers can build and run applications within the development environment, while users usually run applications as executable files outside the development environment.

实参argument

传递给过程的常量、变量或表达式。A constant, variable, or expression passed to a procedure.

数组array

一组顺序索引的元素,这些元素具有相同的内在数据类型。A set of sequentially indexed elements having the same intrinsic data type. 数组的每个元素具有唯一的识别索引号。Each element of an array has a unique identifying index number. 对数组的一个元素进行的更改不会影响其他元素。Changes made to one element of an array don't affect the other elements.

ASCII 字符集ASCII Character Set

用于表示基于标准美国键盘建立的字母和符号的 American Standard Code for Information Interchange (ASCII) 7 位字符集。American Standard Code for Information Interchange (ASCII) 7-bit character set used to represent letters and symbols found on a standard U.S. keyboard. ASCII 字符集与 ANSI 字符集中的前 128 个字符 (0-127) 相同。The ASCII character set is the same as the first 128 characters (0-127) in the ANSI character set.

自动设置格式automatic formatting

通过大写关键字的第一个字母、标准化间隔、添加标点以及设置前景和背景色在您输入代码时自动设置代码的格式的功能。A feature that automatically formats code as you enter it by capitalizing the first letter for keywords, standardizing spacing, adding punctuation, and setting the foreground and background colors.

自动化对象Automation object

通过自动化接口向其他应用程序或编程工具公开的对象。An object that is exposed to other applications or programming tools through Automation interfaces.

基类base class

通过继承派生其他类的原始类。Original class from which other classes can be derived by inheritance.

位图bitmap

用像素表示并存储为位的集合的图像,集合中的每个位对应于一个像素。An image represented by pixels and stored as a collection of bits in which each bit corresponds to one pixel. 在颜色系统上,多个位对应于各像素。On color systems, more than one bit corresponds to each pixel. 位图的文件扩展名通常为 .bmp。A bitmap usually has a .bmp file name extension.

按位比较bitwise comparison

两个数值表达式中位置相同的位的逐位比较。A bit-by-bit comparison between identically positioned bits in two numeric expressions.

Boolean 表达式Boolean expression

计算结果为“True”**** 或“False”****。An expression that evaluates to either True or False.

Boolean 数据类型Boolean data type

A data type with only two possible values, True (-1) or False (0).A data type with only two possible values, True (-1) or False (0). Boolean variables are stored as 16-bit (2-byte) numbers.Boolean variables are stored as 16-bit (2-byte) numbers. 请参阅数据类型摘要See data type summary.

绑定控件bound control

A data-aware control that can provide access to a specific field or fields in a database through a Data control.A data-aware control that can provide access to a specific field or fields in a database through a Data control. A data-aware control is typically bound to a Data control through its DataSource and DataField properties.A data-aware control is typically bound to a Data control through its DataSource and DataField properties. When a Data control moves from one record to the next, all bound controls connected to the Data control change to display data from fields in the current record.When a Data control moves from one record to the next, all bound controls connected to the Data control change to display data from fields in the current record. 用户更改绑定控件中的数据,然后移动到不同的记录时,所进行的更改自动保存在数据库中。When users change data in a bound control and then move to a different record, the changes are automatically saved in the database.

中断模式break mode

在开发环境中暂停程序执行。Temporary suspension of program execution in the development environment. 在中断模式下,可检查、调试、重置、逐步执行或继续程序执行。In break mode, you can examine, debug, reset, step through, or continue program execution. 在以下情况下进入中断模式:You enter break mode when you:

  • 在程序执行时遇到断点。Encounter a breakpoint during program execution.

  • 在程序执行期间按 CTRL+BREAK。Press CTRL+BREAK during program execution.

  • Encounter a Stop statement or untrapped run-time error during program execution.Encounter a Stop statement or untrapped run-time error during program execution.

  • Add a Break When True watch expression.Add a Break When True watch expression. Execution stops when the value of the watch changes and evaluates to True.Execution stops when the value of the watch changes and evaluates to True.

  • Add a Break When Changed watch expression.Add a Break When Changed watch expression. 监视的值更改且计算结果为“True”时执行停止。Execution stops when the value of the watch changes.

断点breakpoint

执行自动停止的所选程序行。A selected program line at which execution automatically stops. 断点不随代码一起保存。Breakpoints are not saved with your code.

按引用by reference

向过程传递参数的地址而不传递值的方法。A way of passing the address of an argument to a procedure instead of passing the value. 这允许过程访问实际变量。This allows the procedure to access the actual variable. 因此,变量的实际值可由其传递到的过程更改。As a result, the variable's actual value can be changed by the procedure to which it is passed. 除非另行指定,否则参数都按引用传递。Unless otherwise specified, arguments are passed by reference.

字节数据类型Byte data type

用于保存 0 - 255 之间的正整数的数据类型。A data type used to hold positive integer numbers ranging from 0-255. 字节变量存储为单个无符号的 8 位(1 字节)数。Byte variables are stored as single, unsigned 8-bit (1-byte) numbers. 请参阅数据类型摘要See data type summary.

按值by value

向过程传递参数的值而不传地址的方法。A way of passing the value of an argument to a procedure instead of passing the address. 这允许过程访问变量的副本。This allows the procedure to access a copy of the variable. 因此,变量的实际值不可由其传递到的过程更改。As a result, the variable's actual value can't be changed by the procedure to which it is passed.

字符代码character code

表示某个集(如 ANSI 字符集)中的特定字符的数字。A number that represents a particular character in a set, such as the ANSI character set.

class

对象的形式定义。The formal definition of an object. 类充当在运行时创建对象的实例所基于的模板。The class acts as the template from which an instance of an object is created at run time. 类定义对象的属性和用于控制对象的行为的方法。The class defines the properties of the object and the methods used to control the object's behavior.

类模块class module

包含类的定义(包括其属性和方法定义)的模块。A module that contains the definition of a class, including its property and method definitions.

代码模块code module

包含可由项目中的所有模块共享的公共代码的模块。A module containing public code that can be shared among all modules in a project. 代码模块在更高版本的 Visual Basic 中被称为标准模块。A code module is referred to as a standard module in later versions of Visual Basic.

代码窗格code pane

代码窗口中包含的用于输入和编辑代码的窗格。A pane contained in a code window that is used for entering and editing code. 代码窗口可包含一个或多个代码窗格。A code window can contain one or more code panes.

集合collection

包含一组相关对象的对象。An object that contains a set of related objects. 每当集合中出现更改时,对象在集合中的位置可更改;因此,集合中任何特定对象的位置可能有所不同。An object's position in the collection can change whenever a change occurs in the collection; therefore, the position of any specific object in the collection can vary. Collection 对象是集合类的标准示例;类的实例为集合。The Collection object is the standard example of a collection class; instances of the class are collections. 集合必须执行不接受任何参数的 NewEnum 方法,返回相应的 IUnknown 对象,并将 VB_UserMemId 属性设为 -4Collections must implement a method called NewEnum that accepts no arguments, returns an appropriate IUnknown object, and has its VB_UserMemId attribute set to -4.

命令行command line

用户提供的用于运行程序的路径、文件名和参数信息。The path, file name, and argument information provided by the user to run a program.

注释comment

向代码添加的解释代码如何工作的文本。Text added to code that explains how the code works. 在 Visual Basic 中,批注行可以撇号(“'”)**** 开始,也可以“Rem”**** 关键字加空格开始。In Visual Basic, a comment line can start with either an apostrophe (') or with the Rem keyword followed by a space.

比较运算符comparison operator

表示两个或多个值或表达式之间关系的符号或字词。Symbol(s) or a word indicating a relationship between two or more values or expressions. 这些运算符包括小于 (<)、小于或等于 (<=)、大于 (>)、大于或等于 (>=)、不等于 (<>) 和等于 (=)。These operators include less than (<), less than or equal to (<=), greater than (>), greater than or equal to (>=), not equal (<>), and equal (=). Additional comparison operators include Is and Like.Additional comparison operators include Is and Like. 请注意:IsLike 不可在 SelectCase 语句中用作比较运算符。Note that Is and Like can't be used as comparison operators in a Select Case statement.

另请参阅比较运算符See also Comparison operators.

编译器指令compiler directive

用于改变编译器的操作的命令。A command used to alter the action of the compiler.

编译时间compile time

源代码转换为可执行代码的期间。The period during which source code is translated to executable code.

条件编译器常量conditional compiler constant

使用“#Const”**** 编译器指令定义或在主机应用程序中定义,并由其他编译器指令用于确定何时或是否对 Visual Basic 代码的特定块进行编译的 Visual Basic 标识符。A Visual Basic identifier that is defined using the #Const compiler directive or defined in the host application and used by other compiler directives to determine when or if certain blocks of Visual Basic code are compiled.

常量constant

A named item that retains a constant value throughout the execution of a program.A named item that retains a constant value throughout the execution of a program. A constant can be a string or numeric literal, another constant, or any combination that includes arithmetic or logical operators except Is and exponentiation.A constant can be a string or numeric literal, another constant, or any combination that includes arithmetic or logical operators except Is and exponentiation. Each host application can define its own set of constants.Each host application can define its own set of constants. Additional constants can be defined by the user with the Const statement.Additional constants can be defined by the user with the Const statement. 可在代码中的任何地方使用常量来替代实际值。You can use constants anywhere in your code in place of actual values.

容器container

可包含其他对象的对象An object that can contain other objects.

控件control

可放置在窗体上并且有其自己的一组已识别属性、方法和事件的对象。An object you can place on a form that has its own set of recognized properties, methods, and events. 可使用控件接收用户输入、显示输出和触发事件过程。You use controls to receive user input, display output, and trigger event procedures. 可使用各种方法操作大多数控件。You can manipulate most controls using methods. 一些控件可进行交互(响应用户的操作),而其他控件时静态的(仅可通过代码访问)。Some controls are interactive (responsive to user actions), while others are static (accessible only through code).

控件数组control array

共享通用名称、类型和事件过程的一组控件。A group of controls that share a common name, type, and event procedures. 数组中的每个控件都有用于确定哪个控件识别事件的唯一索引号。Each control in an array has a unique index number that can be used to determine which control recognizes an event.

货币数据类型Currency data type

A data type with a range of -922,337,203,685,477.5808 to 922,337,203,685,477.5807.A data type with a range of -922,337,203,685,477.5808 to 922,337,203,685,477.5807. Use this data type for calculations involving money and for fixed-point calculations where accuracy is particularly important.Use this data type for calculations involving money and for fixed-point calculations where accuracy is particularly important. at 符号 (@) 类型声明字符在 Visual Basic 中表示 CurrencyThe at sign (@) type-declaration character represents Currency in Visual Basic. 请参阅数据类型摘要See data type summary.

数据类型data type

The characteristic of a variable that determines what kind of data it can hold.The characteristic of a variable that determines what kind of data it can hold. Data types include Byte, Boolean, Integer, Long, Currency, Decimal, Single, Double, Date, String, Object, Variant (default), and user-defined types, as well as specific types of objects.Data types include Byte, Boolean, Integer, Long, Currency, Decimal, Single, Double, Date, String, Object, Variant (default), and user-defined types, as well as specific types of objects. 请参阅数据类型摘要See data type summary.

Date 数据类型Date data type

用于将日期和时间存储为实数的数据类型。A data type used to store dates and times as a real number. 日期变量存储为 64 位(8 字节)数。Date variables are stored as 64-bit (8-byte) numbers. 小数左侧的值表示日期,小数右侧的值表示时间。The value to the left of the decimal represents a date, and the value to the right of the decimal represents a time. 请参阅数据类型摘要See data type summary.

日期表达式date expression

可理解为日期(包括日期文字、看起来像日期的数字、看起来像日期的字符串和函数返回的日期)的任何表达式。Any expression that can be interpreted as a date, including date literals, numbers that look like dates, strings that look like dates, and dates returned from functions. 日期表达式限于可用任何组合表示 100 年 1 月 1 日到 9999 年 12 月 31 日的日期的数字和字符串。A date expression is limited to numbers or strings, in any combination, that can represent a date from January 1, 100 - December 31, 9999.

日期存储为实数的一部分。Dates are stored as part of a real number. 小数左侧的值表示日期,小数右侧的值表示时间。Values to the left of the decimal represent the date; values to the right of the decimal represent the time. 负数表示 1899 年 12 月 30 日之前的日期。Negative numbers represent dates prior to December 30, 1899.

日期字符串date literal

具有由数字符号 (#) 包围起来的有效格式的任何字符序列。Any sequence of characters with a valid format that is surrounded by number signs (#). Valid formats include the date format specified by the locale settings for your code or the universal date format.Valid formats include the date format specified by the locale settings for your code or the universal date format.

例如, #12/31/92# 是表示 1992 年 12 月 31 日的日期文字,其中,应用程序的区域设置是美国英语。For example, #12/31/92# is the date literal that represents December 31, 1992, where English-U.S. is the locale setting for your application. 使用日期文字可最大限度提高国家语言的可移植性。Use date literals to maximize portability across national languages.

日期分隔符date separators

Characters used to separate the day, month, and year when date values are formatted.Characters used to separate the day, month, and year when date values are formatted. 这些字符由系统设置或“字符”**** 函数确定。The characters are determined by system settings or by the Format function.

DBCSDBCS

使用 1 个或 2 个字节表示字符的字符集,可表示超过 256 个字符。A character set that uses 1 or 2 bytes to represent a character, allowing more than 256 characters to be represented.

动态数据交换 (DDE)dynamic data exchange (DDE)

用于通过在 Microsoft Windows 下运行的应用程序间的活动链接交换数据的已建立协议。An established protocol for exchanging data through active links between applications that run under Microsoft Windows.

Decimal 数据类型Decimal data type

A data type that contains decimal numbers scaled by a power of 10.A data type that contains decimal numbers scaled by a power of 10. For zero-scaled numbers, that is, numbers with no decimal places, the range is +/-79,228,162,514,264,337,593,543,950,335.For zero-scaled numbers, that is, numbers with no decimal places, the range is +/-79,228,162,514,264,337,593,543,950,335. For numbers with 28 decimal places the range is +/-7.9228162514264337593543950335.For numbers with 28 decimal places the range is +/-7.9228162514264337593543950335. The smallest non-zero number that can be represented as a Decimal is 0.0000000000000000000000000001.The smallest non-zero number that can be represented as a Decimal is 0.0000000000000000000000000001.

Note that at this time the Decimal data type can only be used within a Variant.Note that at this time the Decimal data type can only be used within a Variant. You cannot declare a variable to be of type Decimal.You cannot declare a variable to be of type Decimal. You can, however, create a Variant whose subtype is Decimal using the CDec function.You can, however, create a Variant whose subtype is Decimal using the CDec function. 请参阅数据类型摘要See data type summary.

声明declaration

列举常量、变量、程序,并指明其特征(如数据类型)的不可执行代码。Nonexecutable code that names a constant, variable, or procedure, and specifies its characteristics, such as data type. 对于 DLL 过程,声明指定名称、库和参数。For DLL procedures, declarations specify names, libraries, and arguments.

设计器designer

在 Visual Basic 开发环境中提供视觉设计窗口。Provides a visual design window in the Visual Basic development environment. 可使用此窗口以可视化方式设计新类。You can use this window to design new classes visually. Visual Basic 具有针对窗体的内置设计器。Visual Basic has built-in designers for forms. Visual Basic 的专业版和企业版包括针对 ActiveX 控件和 ActiveX 文档的设计器。The Professional and Enterprise editions of Visual Basic include designers for ActiveX controls and ActiveX documents.

设计时间design time

在开发环境中通过添加控件、设置控件或窗体属性等操作生成应用程序的时间。The time during which you build an application in the development environment by adding controls, setting control or form properties, and so on. 相比之下,在运行时,您像用户一样与应用程序交互。In contrast, during run time, you interact with the application like a user.

开发环境development environment

您进行编写代码、创建控件、设置控件和窗体属性等操作的应用程序部分。The part of the application where you write code, create controls, set control and form properties, and so on. 这与运行应用程序相对照。This contrasts with running the application.

在运行时加载和链接到应用程序中的例程库。A library of routines loaded and linked into applications at run time. DLL 是使用其他编程语言(如 C、MASM 或 FORTRAN)创建的。DLLs are created with other programming languages such as C, MASM, or FORTRAN.

停靠窗口docked window

附加到主窗口的框架上的窗口。A window that is attached to the frame of the main window.

文档document

使用应用程序创建并具有唯一的文件名的自我包含工作。Any self-contained work created with an application and given a unique file name.

文档设计模式document design mode

一种通常由主机应用程序通过开发人员功能区上的按钮切换的设计模式,其中鼠标与嵌入在文档中的控件进行交互以调整其位置、大小和属性,而不是激活其操作。A design mode toggled by the host application typically via a button on the developer ribbon where mouse interactions with controls embedded in a document adjusts its placement, size and properties instead of activating its actions.

Double 数据类型Double data type

A data type that holds double-precision floating-point numbers as 64-bit numbers in the range -1.79769313486231E308 to -4.94065645841247E-324 for negative values; 4.94065645841247E-324 to 1.79769313486232E308 for positive values.A data type that holds double-precision floating-point numbers as 64-bit numbers in the range -1.79769313486231E308 to -4.94065645841247E-324 for negative values; 4.94065645841247E-324 to 1.79769313486232E308 for positive values. 数字符号 (#) 类型声明字符在 Visual Basic 中表示 DoubleThe number sign (#) type-declaration character represents the Double in Visual Basic. 请参阅数据类型摘要See data type summary.

EmptyEmpty

Indicates that no beginning value has been assigned to a Variant variable.Indicates that no beginning value has been assigned to a Variant variable. “空”**** 变量在数字上下文中表示为 0,或在字符串上下文中表示为零长度的字符串 ("")。An Empty variable is represented as 0 in a numeric context or a zero-length string ("") in a string context.

错误号error number

A whole number in the range 0 - 65,535 that corresponds to the Number property setting of the Err object.A whole number in the range 0 - 65,535 that corresponds to the Number property setting of the Err object. When combined with the Description property setting of the Err object, this number represents a particular error message.When combined with the Description property setting of the Err object, this number represents a particular error message.

事件源对象event source object

An object that is the source of events that occur in response to an action.An object that is the source of events that occur in response to an action. An event source object is returned by a property.An event source object is returned by a property. 例如,“CommandBarEvents”**** 属性返回“CommandBarEvents”**** 对象。For example, the CommandBarEvents property returns the CommandBarEvents object.

可执行文件executable file

可在开发环境外运行的基于 Windows 的应用程序。A Windows-based application that can run outside the development environment. 可执行文件的文件扩展名为 .exe。An executable file has an .exe file name extension.

表达式expression

生成字符串、编号或对象的关键字、运算符、变量和常量的组合。A combination of keywords, operators, variables, and constants that yields a string, number, or object. 表达式可用于执行计算、操作字符或测试数据。An expression can be used to perform a calculation, manipulate characters, or test data.

文件编号file number

Number used in the Open statement to open a file.Number used in the Open statement to open a file. Use file numbers in the range 1-255, inclusive, for files not accessible to other applications.Use file numbers in the range 1-255, inclusive, for files not accessible to other applications. Use file numbers in the range 256-511 for files accessible from other applications.Use file numbers in the range 256-511 for files accessible from other applications.

焦点focus

可在任何时候接收鼠标单击或键盘输入的能力。The ability to receive mouse clicks or keyboard input at any one time. 在 Microsoft Windows 环境中,每次仅可有一个窗口、窗体或控件具有此能力。In the Microsoft Windows environment, only one window, form, or control can have this ability at a time. "具有焦点"的对象通常由突出显示的标题或标题栏指示。The object that "has the focus" is normally indicated by a highlighted caption or title bar. 焦点可由用户或应用程序设置。The focus can be set by the user or by the application.

窗体form

一个窗口或对话框。A window or dialog box. 窗体时控件的容器。Forms are containers for controls. 多文档界面 (MDI) 窗体还可充当子窗体和一些控件的容器。A multiple-document interface (MDI) form can also act as a container for child forms and some controls.

窗体模块form module

Visual Basic 项目中文件扩展名为 .frm 的文件,该文件可包含窗体、其控件及控件的属性设置、常量、变量和外部过程的窗体级别声明以及事件和常规过程的图形说明。A file in a Visual Basic project with an .frm file name extension that can contain graphical descriptions of a form; its controls and their property settings; form-level declarations of constants, variables, and external procedures; and event and general procedures.

Function 过程Function procedure

A procedure that performs a specific task within a program and returns a value.A procedure that performs a specific task within a program and returns a value. “Function”**** 过程以“Function”**** 语句开始,以“End Function”**** 语句结束。A Function procedure begins with a Function statement and ends with an End Function statement.

常规过程general procedure

必须由其他过程明确调用的过程。A procedure that must be explicitly called by another procedure. 相比之下,将自动调用事件过程以响应用户或系统操作。In contrast, an event procedure is invoked automatically in response to a user or system action.

图形方法graphics method

A method that operates on an object such as a Form, PictureBox, or Printer, and performs run-time drawing operations such as animation or simulation.A method that operates on an object such as a Form, PictureBox, or Printer, and performs run-time drawing operations such as animation or simulation. 图形方法包括“Circle”****、“Cls”****、“Line”****、“PaintPicture”****、“Point”****、“Print”**** 和“PSet”****。The graphics methods are Circle, Cls, Line, PaintPicture, Point, Print, and PSet.

主机应用程序host application

支持使用 Visual Basic for Applications 的任何应用程序,如 Microsoft Excel 和 Microsoft Project 等。Any application that supports the use of Visual Basic for Applications, for example, Microsoft Excel, Microsoft Project, and so on.

图标icon

对象或概念的图形表示;通常用于表示 Microsoft Windows 中最小化的应用程序。A graphical representation of an object or concept; commonly used to represent minimized applications in Microsoft Windows. 图标时最大大小为 32 x 32 像素的位图。An icon is a bitmap with a maximum size of 32 x 32 pixels. 图标的文件扩展名为 .ico。Icons have an .ico file name extension.

标识符identifier

引用常量或变量的表达式元素。An element of an expression that refers to a constant or variable.

进程内in process

在与应用程序相同的地址空间内运行。Running in the same address space as an application.

可插入对象insertable object

表示自定义控件的类型的应用程序对象,如 Microsoft Excel 工作表。An application object that is a type of custom control, such as a Microsoft Excel worksheet.

Integer 数据类型Integer data type

A data type that holds integer variables stored as 2-byte whole numbers in the range -32,768 to 32,767.A data type that holds integer variables stored as 2-byte whole numbers in the range -32,768 to 32,767. The Integer data type is also used to represent enumerated values.The Integer data type is also used to represent enumerated values. 百分号 (%) 类型声明字符在 Visual Basic 中表示 IntegerThe percent sign (%) type-declaration character represents an Integer in Visual Basic. 请参阅数据类型摘要See data type summary.

内部常量intrinsic constants

A constant provided by an application.A constant provided by an application. Visual Basic constants are listed in the object library and can be viewed with the Object Browser.Visual Basic constants are listed in the object library and can be viewed with the Object Browser. Because you can't disable intrinsic constants, you can't create a user-defined constant with the same name.Because you can't disable intrinsic constants, you can't create a user-defined constant with the same name.

关键字keyword

被识别为 Visual Basic 编程语言一部分的字词或符号;例如,语句、函数名称或运算符。A word or symbol recognized as part of the Visual Basic programming language; for example, a statement, function name, or operator.

行继续符line-continuation character

空格后加下划线 (_) 的组合,在开发环境中用于将代码的单个逻辑行扩展为两个或更多物理行。The combination of a space followed by an underscore (_) used in the development environment to extend a single logical line of code to two or more physical lines. 但是,不能使用行继续符来继续字符串表达式中的一行代码。However, you can't use a line-continuation character to continue a line of code within a string expression.

行标记line label

用于标识单个代码行。Used to identify a single line of code. 行标记可以是以字母开头并以冒号 (:) 结尾的字符的任意组合。A line label can be any combination of characters that starts with a letter and ends with a colon (:). 行标记不区分大小写,必须从第一列开始。Line labels are not case sensitive and must begin in the first column.

行号line number

用于识别单个代码行。Used to identify a single line of code. 行号可以是使用该行号的模块内的唯一数字的任何组合。A line number can be any combination of digits that is unique within the module where it is used. 行号必须在第一列中开始。Line numbers must begin in the first column.

链接窗口linked window

一个窗口,它连接到主窗口以外的其他窗口。A window that is joined to another window other than the main window.

链接窗口框架linked window frame

包含多个已链接在一起的窗口的窗口框架。A window frame containing multiple windows that have been linked together.

区域设置locale

对应于给定语言和国家/地区的信息集。The set of information that corresponds to a given language and country/region. 代码区域设置影响术语(如关键字)的语言,并定义区域设置特定的设置(如小数和列表分隔符、日期格式和字符排序顺序)。The code locale setting affects the language of terms such as keywords and defines locale-specific settings such as the decimal and list separators, date formats, and character sorting order.

The system locale setting affects the way locale-aware functionality behaves, for example, when you display numbers or convert strings to dates.The system locale setting affects the way locale-aware functionality behaves, for example, when you display numbers or convert strings to dates. You set the system locale using the Control Panel utilities provided by the operating system.You set the system locale using the Control Panel utilities provided by the operating system.

虽然代码区域设置和系统区域设置通常设置为相同的设置,但在某些情况下可能有所不同。Although the code locale and system locale are generally set to the same setting, they may differ in some situations. 例如,在 Visual Basic 标准版和 Visual Basic 专业版中,代码未从美国英语进行转换,并且不可更改。For example, in Visual Basic, Standard Edition and Visual Basic, Professional Edition, the code is not translated from English-U.S. The system locale can be set to the user's language and country/region, but the code locale is always set to English-U.S. and can't be changed. 在此情况下,使用美国英语分隔符、格式占位符和排序顺序。In this case, the English-U.S. separators, format placeholders, and sorting order are used.

逻辑错误logic error

可导致代码产生错误的结果或停止执行的编程错误。A programming error that can cause code to produce incorrect results or stop execution. 例如,逻辑错误可由错误的变量名称、错误的变量类型、无限循环、比较缺陷或数组问题引起。For example, a logic error can be caused by incorrect variable names, incorrect variable types, endless loops, flaws in comparisons, or array problems.

Long 数据类型Long data type

一个 4 字节的整数,值范围从 -2,147,483,648 到 2,147,483,647。A 4-byte integer ranging in value from -2,147,483,648 to 2,147,483,647. & 号 (&) 类型声明字符在 Visual Basic 中表示 LongThe ampersand (&) type-declaration character represents a Long in Visual Basic. 请参阅数据类型摘要See data type summary.

边距指示器margin indicator

“代码”窗口中“边距指示器”栏中显示的图标****。An icon displayed in the Margin Indicator bar in the Code window. 边距指示器在代码编辑期间提供视觉提示。Margin indicators provide visual cues during code editing.

MDI 子窗体MDI child

A form contained within an MDI form in a multiple-document interface (MDI) application.A form contained within an MDI form in a multiple-document interface (MDI) application. To create a child form, set the MDIChild property of the MDI form to True.To create a child form, set the MDIChild property of the MDI form to True.

MDI 窗体MDI form

组成多文档界面 (MDI) 应用程序的背景的超酷。A window that makes up the background of a multiple-document interface (MDI) application. MDI 窗体是应用程序中任何 MDI 子窗体的容器。The MDI form is the container for any MDI child forms in the application.

成员member

集合、对象或用户定义类型的元素。An element of a collection, object, or user-defined type.

元文件metafile

将图像存储为图形对象(如直线、圆和多边形)而不是像素的文件。A file that stores an image as graphical objects such as lines, circles, and polygons rather than as pixels. 有两类图元文件,即标准图元文件和增强图元文件。There are two types of metafiles, standard and enhanced. 标准图元文件的文件扩展名通常为 .wmf。Standard metafiles usually have a .wmf file name extension. 增强图元文件的文件扩展名通常为 .emf。Enhanced metafiles usually have a .emf file name extension. 调整图像的大小时,图元文件比像素更准确地保存图像。Metafiles preserve an image more accurately than pixels when the image is resized.

方法method

作用于对象的过程。A procedure that acts on an object.

模块module

一组声明,后跟过程。A set of declarations followed by procedures.

模块级module level

在模块的"声明"部分说明代码。Describes code in the Declarations section of a module. 过程外的任何代码均被称为模块级代码。Any code outside a procedure is referred to as module-level code. 必须首先列出声明,而声明后是过程。Declarations must be listed first, followed by procedures.

模块变量module variable

A variable declared outside Function, Sub, or Property procedure code.A variable declared outside Function, Sub, or Property procedure code. Module variables must be declared outside any procedures in the module.Module variables must be declared outside any procedures in the module. They exist while the module is loaded and are visible in all procedures in the module.They exist while the module is loaded and are visible in all procedures in the module.

命名参数named argument

具有对象库中预定义的名称的参数。An argument that has a name that is predefined in the object library. 不用以指定顺序为每个参数提供值(使用语法除外),可使用命名参数以任何顺序分配值。Instead of providing a value for each argument in a specified order expected by the syntax, you can use named arguments to assign values in any order. 例如,假设某个方法接受三个变量:For example, suppose a method accepts three arguments:

DoSomeThing namedarg1、namedarg2、namedarg3DoSomeThing namedarg1, namedarg2, namedarg3

通过向命名参数分配值,可使用以下语句。By assigning values to named arguments, you can use the following statement:

DoSomeThing namedarg3 := 4, namedarg2 := 5, namedarg1 := 20 

请注意,命名参数无需在语法中按普通位置顺序显示。Note that the named arguments don't have to appear in the normal positional order in the syntax.

NULLNull

A value indicating that a variable contains no valid data.A value indicating that a variable contains no valid data. Null is the result of an explicit assignment of Null to a variable or any operation between expressions that contain Null.Null is the result of an explicit assignment of Null to a variable or any operation between expressions that contain Null.

numeric 数据类型numeric data type

任何内部数值数据类型(ByteBooleanIntegerLongCurrencySingleDoubleDate)。Any intrinsic numeric data type (Byte, Boolean, Integer, Long, Currency, Single, Double, or Date). 请参阅数据类型摘要See data type summary.

数值表达式numeric expression

可评估为数字的任何表达式。Any expression that can be evaluated as a number. 表达式的元素可包括关键字、变量、常量和产生数字的运算符的任意组合。Elements of an expression can include any combination of keywords, variables, constants, and operators that result in a number.

数字类型numeric type

任何内部数值数据类型(ByteBooleanIntegerLongCurrencySingleDoubleDate)或任何 Variant 数值子类型(EmptyIntegerLongSingleDoubleCurrencyDecimalDateErrorBooleanByte)。Any intrinsic numeric data type (Byte, Boolean, Integer, Long, Currency, Single, Double, or Date) or any Variant numeric subtype (Empty, Integer, Long, Single, Double, Currency, Decimal, Date, Error, Boolean, or Byte). 请参阅数据类型摘要See data type summary.

对象object

可视为一个单元(如控件、窗体或应用程序组件)的代码和数据的组合。A combination of code and data that can be treated as a unit, for example, a control, form, or application component. 每个对象均由类定义。Each object is defined by a class.

“对象”框Object box

“代码”窗口左上角列出代码附加到的窗体中的窗体和控件的列表框,或位于“属性”窗口顶部列出窗体及其控件的列表框****。A list box at the upper-left corner of the Code window that lists the form and controls in the form to which the code is attached, or a list box located at the top of the Properties window that lists the form and its controls.

对象浏览器Object Browser

一个对话框,可以在其中检查对象库的内容以获取有关所提供对象的信息。A dialog box in which you can examine the contents of an object library to get information about the objects provided.

Object 数据类型Object data type

A data type that represents any Object reference.A data type that represents any Object reference. Object variables are stored as 32-bit (4-byte) addresses that refer to objects.Object variables are stored as 32-bit (4-byte) addresses that refer to objects. 请参阅数据类型摘要See data type summary.

对象表达式object expression

An expression that specifies a particular object and can include any of the object's containers.An expression that specifies a particular object and can include any of the object's containers. For example, an application can have an Application object that contains a Document object that contains a Text object.For example, an application can have an Application object that contains a Document object that contains a Text object.

对象库object library

A file with the .olb extension that provides information to Automation controllers (like Visual Basic) about available objects.A file with the .olb extension that provides information to Automation controllers (like Visual Basic) about available objects. You can use the Object Browser to examine the contents of an object library to get information about the objects provided.You can use the Object Browser to examine the contents of an object library to get information about the objects provided.

对象模块object module

包含特定于对象的代码的模块,如类模块、窗体模块和文档模块。A module that contains code specific to an object, for example, class module, form module, and document module. 对象模块包含其关联的对象后的代码。Object modules contain the code behind their associated objects. 适用于对象模块的规则不同于适用于标准模块的规则。The rules for object modules differ from those for standard modules.

对象类型object type

A type of object exposed by an application through Automation, for example, Application, File, Range, and Sheet.A type of object exposed by an application through Automation, for example, Application, File, Range, and Sheet. Use the Object Browser or refer to the application's documentation for a complete listing of available objects.Use the Object Browser or refer to the application's documentation for a complete listing of available objects.

对象变量object variable

包含对象引用的变量。A variable that contains a reference to an object.

形参parameter

知道过程内传递到过程的参数所依据的变量名称。Variable name by which an argument passed to a procedure is known within the procedure. 此变量接收传递到过程中的参数。This variable receives the argument passed into the procedure. 其范围在过程结束时结束。Its scope ends when the procedure ends.

路径path

指定目录或文件夹位置的字符串表达式。A string expression specifying a directory or folder location. 该位置可包括驱动器规格。The location can include a drive specification.

圆周率pi

一个数学常数,约等于 3.1415926535897932。A mathematical constant equal to approximately 3.1415926535897932.

point

磅的大小为 1/72 英寸。A point is 1/72 inch. 字号通常用磅衡量。Font sizes are usually measured in points.

每 14 列开始一个打印区域。Print zones begin every 14 columns. 每列的宽度为选定字体磅值的所有字符的平均宽度。The width of each column is an average of the width of all characters in the point size for the selected font.

PrivatePrivate

仅对声明它们的模块可见的变量。Variables that are visible only to the module in which they are declared.

过程procedure

A named sequence of statements executed as a unit.A named sequence of statements executed as a unit. For example, Function, Property, and Sub are types of procedures.For example, Function, Property, and Sub are types of procedures. A procedure name is always defined at module level.A procedure name is always defined at module level. All executable code must be contained in a procedure.All executable code must be contained in a procedure. Procedures can't be nested within other procedures.Procedures can't be nested within other procedures.

“过程”框Procedure box

“代码”窗口和“调试”窗口右上角的列表框,显示为“对象”框中显示的对象识别的过程********。A list box at the upper-right corner of the Code window and the Debug window that displays the procedures recognized for the object displayed in the Object box.

过程调用procedure call

代码中的语句,告诉 Visual Basic 执行某个过程。A statement in code that tells Visual Basic to execute a procedure.

过程级procedure level

Describes statements located within a Function, Property, or Sub procedure.Describes statements located within a Function, Property, or Sub procedure. Declarations are usually listed first, followed by assignments and other executable code.Declarations are usually listed first, followed by assignments and other executable code.

请注意,模块级代码位于过程块之外。Note that module-level code resides outside a procedure block.

项目project

一组模块。A set of modules.

“项目”窗口Project window

A window that displays a list of the form, class, and standard modules; the resource file; and references in your project.A window that displays a list of the form, class, and standard modules; the resource file; and references in your project. Files with .ocx and .vbx file name extensions aren't displayed in the Project window.Files with .ocx and .vbx file name extensions aren't displayed in the Project window.

“属性”窗口Properties window

A window used to display or change properties of a selected form or control at design time.A window used to display or change properties of a selected form or control at design time. Some custom controls have customized Properties windows.Some custom controls have customized Properties windows.

propertyproperty

对象的命名属性。A named attribute of an object. 属性定义大小、颜色和屏幕位置,或对象的状态(如启用或禁用)等对象特征。Properties define object characteristics such as size, color, and screen location, or the state of an object, such as enabled or disabled.

Property 过程Property procedure

A procedure that creates and manipulates properties for a class module.A procedure that creates and manipulates properties for a class module. A Property procedure begins with a Property Let, Property Get, or Property Set statement and ends with an End Property statement.A Property procedure begins with a Property Let, Property Get, or Property Set statement and ends with an End Property statement.

PublicPublic

Variables declared using the Public statement are visible to all procedures in all modules in all applications unless Option Private Module is in effect.Variables declared using the Public statement are visible to all procedures in all modules in all applications unless Option Private Module is in effect. In that case, the variables are public only within the project in which they reside.In that case, the variables are public only within the project in which they reside.

已引用项目referenced project

The project you directly create a link to from the current project you are working on.The project you directly create a link to from the current project you are working on. A project referenced by one of the current project's directly referenced projects is called an indirectly referenced project.A project referenced by one of the current project's directly referenced projects is called an indirectly referenced project. Its Public variables are not accessible to the current project except through qualification with its project name.Its Public variables are not accessible to the current project except through qualification with its project name. Any combination of direct and indirect references between projects is valid as long as they do not result in a complete cycle.Any combination of direct and indirect references between projects is valid as long as they do not result in a complete cycle.

正在引用的项目referencing project

The current project.The current project. How you create a link to a project depends on the host application.How you create a link to a project depends on the host application. For example, to directly reference a project in Microsoft Excel, select the project from the References dialog box of the Tools menu.For example, to directly reference a project in Microsoft Excel, select the project from the References dialog box of the Tools menu. Public variables in a directly referenced project are visible to the directly referencing project, but Public variables in a directly referencing project are not visible to a directly referenced project.Public variables in a directly referenced project are visible to the directly referencing project, but Public variables in a directly referencing project are not visible to a directly referenced project.

注册表registry

在 Microsoft Windows 版本 3.1 中,OLE 注册信息和文件关联存储在注册数据库中,而程序设置存储在 Windows 系统初始化 (.ini) 文件中。In Microsoft Windows version 3.1, OLE registration information and file associations are stored in the registration database, and program settings are stored in Windows system initialization (.ini) files. 在 Microsoft Windows 95 中,Windows 注册表充当用户、应用程序和计算机特定信息(包括以前的 Windows 版本 3.1 注册数据库和 .ini 文件中包含的信息)的中央配置数据库。In Microsoft Windows 95, the Windows registry serves as a central configuration database for user, application, and computer-specific information, including the information previously contained in both the Windows version 3.1 registration database and .ini files.

资源文件resource file

Visual Basic 项目中文件扩展名为 .res 的文件,可包含位图、文本字符串或其他数据。A file in a Visual Basic project with an .res file name extension that can contain bitmaps, text strings, or other data. 通过将此数据存储在单独的文件中,可在无需编辑代码的情况下 更改信息。By storing this data in a separate file, you can change the information without editing your code. 仅可有一个资源文件与项目关联。Only one resource file can be associated with a project.

运行时错误run-time error

在代码正在运行时发生的错误。An error that occurs when code is running. 运行时错误在语句尝试无效操作时发生。A run-time error results when a statement attempts an invalid operation.

运行时run time

运行代码的时间。The time during which code is running. 在运行时期间,不可编辑代码。During run time, you can't edit the code.

范围scope

Defines the visibility of a variable, procedure, or object.Defines the visibility of a variable, procedure, or object. For example, a variable declared as Public is visible to all procedures in all modules in a directly referencing project unless Option Private Module is in effect.For example, a variable declared as Public is visible to all procedures in all modules in a directly referencing project unless Option Private Module is in effect. When Option Private Module is in effect, the module itself is private and therefore not visible to referencing projects.When Option Private Module is in effect, the module itself is private and therefore not visible to referencing projects. Variables declared in a procedure are visible only within the procedure and lose their value between calls unless they are declared Static.Variables declared in a procedure are visible only within the procedure and lose their value between calls unless they are declared Static.

种子seed

An initial value used to generate pseudorandom numbers.An initial value used to generate pseudorandom numbers. For example, the Randomize statement creates a seed number used by the Rnd function to create unique pseudorandom number sequences.For example, the Randomize statement creates a seed number used by the Rnd function to create unique pseudorandom number sequences.

Single 数据类型Single data type

A data type that stores single-precision floating-point variables as 32-bit (4-byte) floating-point numbers, ranging in value from -3.402823E38 to -1.401298E-45 for negative values, and 1.401298E-45 to 3.402823E38 for positive values.A data type that stores single-precision floating-point variables as 32-bit (4-byte) floating-point numbers, ranging in value from -3.402823E38 to -1.401298E-45 for negative values, and 1.401298E-45 to 3.402823E38 for positive values. 感叹号 (!) 类型声明字符在 Visual Basic 中表示 SingleThe exclamation point (!) type-declaration character represents a Single in Visual Basic. 请参阅数据类型摘要See data type summary.

排序顺序sort order

用于对数据进行排序的排序原则,例如,字母、数字、升序、降序等。A sequencing principle used to order data, for example, alphabetic, numeric, ascending, descending, and so on.

堆栈stack

Visual Basic 用于在过程调用期间保留局部变量和参数的固定内存量。A fixed amount of memory used by Visual Basic to preserve local variables and arguments during procedure calls.

标准模块standard module

A module containing only procedure, type, and data declarations and definitions.A module containing only procedure, type, and data declarations and definitions. Module-level declarations and definitions in a standard module are Public by default.Module-level declarations and definitions in a standard module are Public by default. A standard module is referred to as a code module in earlier versions of Visual Basic.A standard module is referred to as a code module in earlier versions of Visual Basic.

语句statement

语法完整的单元,表示一种操作、声明或定义。A syntactically complete unit that expresses one kind of action, declaration, or definition. 语句通常占用一行,但可以使用冒号 (:) 在一行中包含多个语句。A statement generally occupies a single line, although you can use a colon (:) to include more than one statement on a line. 还可以使用行继续符 (_) 将单个逻辑行继续到第二个物理行。You can also use a line-continuation character (_) to continue a single logical line onto a second physical line.

字符串比较string comparison

A comparison of two sequences of characters.A comparison of two sequences of characters. Use Option Compare to specify binary or text comparison.Use Option Compare to specify binary or text comparison. In English-U.S., binary comparisons are case sensitive; text comparisons are not.In English-U.S., binary comparisons are case sensitive; text comparisons are not.

字符串常量string constant

Any constant (defined using the Const keyword) consisting of a sequence of contiguous characters interpreted as the characters themselves rather than as a numeric value.Any constant (defined using the Const keyword) consisting of a sequence of contiguous characters interpreted as the characters themselves rather than as a numeric value.

String 数据类型String data type

A data type consisting of a sequence of contiguous characters that represent the characters themselves rather than their numeric values.A data type consisting of a sequence of contiguous characters that represent the characters themselves rather than their numeric values. A String can include letters, numbers, spaces, and punctuation.A String can include letters, numbers, spaces, and punctuation. The String data type can store fixed-length strings ranging in length from 0 to approximately 63K characters and dynamic strings ranging in length from 0 to approximately 2 billion characters.The String data type can store fixed-length strings ranging in length from 0 to approximately 63K characters and dynamic strings ranging in length from 0 to approximately 2 billion characters. 美元符号 ($) 类型声明字符在 Visual Basic 中表示 StringThe dollar sign ($) type-declaration character represents a String in Visual Basic. 请参阅数据类型摘要See data type summary.

字符串表达式string expression

计算结果为一系列相邻字符的任何表达式。Any expression that evaluates to a sequence of contiguous characters. 字符串表达式的元素可以包括返回字符串、字符串文本、字符串常量、字符串变量、字符串 Variant 的函数,或返回字符串 Variant (VarType 8) 的函数。Elements of a string expression can include a function that returns a string, a string literal, a string constant, a string variable, a string Variant, or a function that returns a string Variant (VarType 8).

字符串文本string literal

包含由引号包围的照字面意思解释为引号内的字符的连续字符序列的任何表达式。Any expression consisting of a sequence of contiguous characters surrounded by quotation marks that is literally interpreted as the characters within the quotation marks.

Sub 过程Sub procedure

A procedure that performs a specific task within a program, but returns no explicit value.A procedure that performs a specific task within a program, but returns no explicit value. A Sub procedure begins with a Sub statement and ends with an End Sub statement.A Sub procedure begins with a Sub statement and ends with an End Sub statement.

语法检查syntax checking

检查代码是否采用正确的语法的功能。A feature that checks your code for correct syntax. 如果启用了代码检查功能,则在输入包含语法错误的代码时显示消息,并突出显示可疑代码。If the syntax checking feature is enabled, a message is displayed when you enter code that contains a syntax error and the suspect code is highlighted.

语法错误syntax error

输入 Visual Basic 未识别的代码行时发生的错误。An error that occurs when you enter a line of code that Visual Basic doesn't recognize.

请注意,单个关键字的语法规则在关联的帮助主题中的"语法"部分定义。Note that syntax rules for individual keywords are defined in the Syntax section of the associated Help topic. 若要从开发环境内获取有关关键字的帮助,请选择关键字并按 F1。To get Help on a keyword from within the development environment, select the keyword and press F1.

Tab 键顺序tab order

按 TAB 或 SHIFT+TAB 时焦点从一个字段移动到下一个字段的顺序。The order in which the focus moves from one field to the next as you press TAB or SHIFT+TAB.

时间表达式time expression

可理解为时间的任何表达式。Any expression that can be interpreted as a time. 这包括时间文字、看起来像时间的数字、看起来像时间的字符串和函数返回的时间的任何组合。This includes any combination of time literals, numbers that look like times, strings that look like times, and times returned from functions.

时间存储为实数的一部分。Times are stored as part of a real number. 小数右边的值表示时间。Values to the right of the decimal represent the time. 例如,正午 (12:00 P.M.) 由 0.5 表示。For example, midday (12:00 P.M.) is represented by 0.5.

twip

等于 1/20 磅的屏幕测量单位。A unit of screen measurement equal to 1/20 point. 缇是独立于屏幕的单位,用于确保屏幕应用程序中屏幕元素的放置和比例在所有显示系统上均相同。A twip is a screen-independent unit used to ensure that placement and proportion of screen elements in your screen application are the same on all display systems. 每逻辑英寸有约 1440 缇,或每逻辑厘米(打印是测量一英寸或一厘米的屏幕项的长度)有约 567 缇。There are approximately 1440 twips to a logical inch or 567 twips to a logical centimeter (the length of a screen item measuring one inch or one centimeter when printed).

类型声明字符type-declaration character

附加到变量名称的字符,表示变量的数据类型。A character appended to a variable name indicating the variable's data type. 默认情况下,变量的类型为 Variant,除非模块中存在相应的 Deftype 语句。By default, variables are of type Variant unless a corresponding Deftype statement is present in the module.

类型库type library

另一个文件内包含可用于自动化的公开对象、属性和方法的文件或组件。A file or component within another file that contains standard descriptions of exposed objects, properties, and methods that are available for Automation. 对象库文件 (.olb) 包含类型库。Object library files (.olb) contain type libraries.

UnicodeUnicode

国际标准化组织 (ISO) 字符标准。International Standards Organization (ISO) character standard. Unicode 使用允许 65,536 和不同字符空格的 16 位(2 字节)编码方案。Unicode uses a 16-bit (2-byte) coding scheme that allows for 65,536 distinct character spaces. Unicode 包括标点符号、数学符号、丁贝符的表示,并由大量的控件可用于将来的扩展 。Unicode includes representations for punctuation marks, mathematical symbols, and dingbats, with substantial room for future expansion.

通用日期格式universal date format

通用日期格式为 #yyyy-mm-dd hh:mm:ss#The universal date format is #yyyy-mm-dd hh:mm:ss#. 但日期组件 ( #yyyy-mm-dd#) 和时间组件 ( #hh:mm:ss#) 均可单独表示。However, both the date component ( #yyyy-mm-dd#) and the time component ( #hh:mm:ss#) can be represented separately.

用户定义类型user-defined type

Any data type defined using the Type statement.Any data type defined using the Type statement. User-defined data types can contain one or more elements of any data type.User-defined data types can contain one or more elements of any data type. Arrays of user-defined and other data types are created using the Dim statement.Arrays of user-defined and other data types are created using the Dim statement. Arrays of any type can be included within user-defined types.Arrays of any type can be included within user-defined types. 请参阅数据类型摘要See data type summary.

变量variable

可包含可在程序执行期间修改的数据的命名存储位置。A named storage location that can contain data that can be modified during program execution. 每个变量都具有在其范围内唯一标识该变量的名称。Each variable has a name that uniquely identifies it within its scope. 可指定数据类型,也可不指定。A data type can be specified or not.

变量名称必须以字母字符开始;在相同的范围内必须是唯一的;不可超过 255 个字符,并且不可包含嵌入期间或类型声明字符。Variable names must begin with an alphabetic character, must be unique within the same scope, can't be longer than 255 characters, and can't contain an embedded period or type-declaration character.

Variant 数据类型Variant data type

A special data type that can contain numeric, string, or date data as well as user-defined types and the special values Empty and Null.A special data type that can contain numeric, string, or date data as well as user-defined types and the special values Empty and Null. The Variant data type has a numeric storage size of 16 bytes and can contain data up to the range of a Decimal, or a character storage size of 22 bytes (plus string length), and can store any character text.The Variant data type has a numeric storage size of 16 bytes and can contain data up to the range of a Decimal, or a character storage size of 22 bytes (plus string length), and can store any character text. The VarType function defines how the data in a Variant is treated.The VarType function defines how the data in a Variant is treated. All variables become Variant data types if not explicitly declared as some other data type.All variables become Variant data types if not explicitly declared as some other data type. 请参阅数据类型摘要See data type summary.

变量表达式variant expression

计算结果可以是数字、字符串或日期数据的任何表达式,以及特殊值 EmptyNullAny expression that can evaluate to numeric, string, or date data, as well as the special values Empty and Null.

监视表达式watch expression

A user-defined expression that enables you to observe the behavior of a variable or expression.A user-defined expression that enables you to observe the behavior of a variable or expression. Watch expressions appear in the Watch window of the Visual Basic Editor and are automatically updated when you enter break mode.Watch expressions appear in the Watch window of the Visual Basic Editor and are automatically updated when you enter break mode. The Watch window displays the value of an expression within a given context.The Watch window displays the value of an expression within a given context. Watch expressions are not saved with your code.Watch expressions are not saved with your code.

z 顺序z-order

窗体上的控件沿窗体的 z 轴(深度)的视觉分层 。The visual layering of controls on a form along the form's z-axis (depth). z 顺序确定哪个控件位于其他控件的前面。The z-order determines which controls are in front of other controls.

另请参阅See also

支持和反馈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.