VBE 术语表

Visual Basic 编辑器 (VBE) 术语词汇。

访问键

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 打开“文件”菜单。

ActiveX 控件

置于窗体上的对象,可实现或增强用户与应用程序的交互。 ActiveX 控件拥有事件并可合并到其他控件中。 这些控件的文件扩展名为 .ocx。

ActiveX 对象

通过自动化界面向其他应用程序或编程工具公开的对象。

加载项

将各功能添加到 Visual Basic 开发环境中的自定义工具。

ANSI 字符集

用键盘表示多达 256 个字符 (0-255) 的美国国家标准学会 (ANSI) 8 位字符集。 前 128 个字符 (0-127) 对应于标准美国键盘上的字母和符号。 后 128 个字符 (128-255) 表示特殊字符,如国际字母表中的字母、重音、货币符号和分数。

应用程序

作为单个程序一起工作的代码和视觉元素的集合。 开发人员可在开发环境内生成和运行应用程序,而用户通常在开发环境外将应用程序作为可执行的文件运行。

实参

传递给过程的常量、变量或表达式。

数组

一组顺序索引的元素,这些元素具有相同的内在数据类型。 数组的每个元素具有唯一的识别索引号。 对数组的一个元素进行的更改不会影响其他元素。

ASCII 字符集

用于表示基于标准美国键盘建立的字母和符号的 American Standard Code for Information Interchange (ASCII) 7 位字符集。 ASCII 字符集与 ANSI 字符集中的前 128 个字符 (0-127) 相同。

自动设置格式

通过大写关键字的第一个字母、标准化间隔、添加标点以及设置前景和背景色在您输入代码时自动设置代码的格式的功能。

自动化对象

通过自动化接口向其他应用程序或编程工具公开的对象。

基类

通过继承派生其他类的原始类。

位图

用像素表示并存储为位的集合的图像,集合中的每个位对应于一个像素。 在颜色系统上,多个位对应于各像素。 位图的文件扩展名通常为 .bmp。

按位比较

两个数值表达式中位置相同的位的逐位比较。

Boolean 表达式

计算结果为“True”或“False”

Boolean 数据类型

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

绑定控件

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. 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. 用户更改绑定控件中的数据,然后移动到不同的记录时,所进行的更改自动保存在数据库中。

中断模式

在开发环境中暂停程序执行。 在中断模式下,可检查、调试、重置、逐步执行或继续程序执行。 在以下情况下进入中断模式:

  • 在程序执行时遇到断点。

  • 在程序执行期间按 CTRL+BREAK。

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

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

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

断点

执行自动停止的所选程序行。 断点不随代码一起保存。

按引用

向过程传递参数的地址而不传递值的方法。 这允许过程访问实际变量。 因此,变量的实际值可由其传递到的过程更改。 除非另行指定,否则参数都按引用传递。

字节数据类型

用于保存 0 - 255 之间的正整数的数据类型。 字节变量存储为单个无符号的 8 位(1 字节)数。 请参阅数据类型摘要

按值

向过程传递参数的值而不传地址的方法。 这允许过程访问变量的副本。 因此,变量的实际值不可由其传递到的过程更改。

字符代码

表示某个集(如 ANSI 字符集)中的特定字符的数字。

对象的形式定义。 类充当在运行时创建对象的实例所基于的模板。 类定义对象的属性和用于控制对象的行为的方法。

类模块

包含类的定义(包括其属性和方法定义)的模块。

代码模块

包含可由项目中的所有模块共享的公共代码的模块。 代码模块在更高版本的 Visual Basic 中被称为标准模块。

代码窗格

代码窗口中包含的用于输入和编辑代码的窗格。 代码窗口可包含一个或多个代码窗格。

集合

包含一组相关对象的对象。 每当集合中出现更改时,对象在集合中的位置可更改;因此,集合中任何特定对象的位置可能有所不同。 Collection 对象是集合类的标准示例;类的实例为集合。 集合必须执行不接受任何参数的 NewEnum 方法,返回相应的 IUnknown 对象,并将 VB_UserMemId 属性设为 -4

命令行

用户提供的用于运行程序的路径、文件名和参数信息。

注释

向代码添加的解释代码如何工作的文本。 在 Visual Basic 中,批注行可以撇号(“'”)开始,也可以“Rem”关键字加空格开始。

比较运算符

表示两个或多个值或表达式之间关系的符号或字词。 这些运算符包括小于 (<) 、小于或等于 (<=) 、大于 (>) 、大于或等于 (>=) 、不等于 (<>) 以及等于 (=) 。 Additional comparison operators include Is and Like. 请注意:IsLike 不可在 SelectCase 语句中用作比较运算符。

另请参阅比较运算符

编译器指令

用于改变编译器的操作的命令。

编译时间

源代码转换为可执行代码的期间。

条件编译器常量

使用“#Const”编译器指令定义或在主机应用程序中定义,并由其他编译器指令用于确定何时或是否对 Visual Basic 代码的特定块进行编译的 Visual Basic 标识符。

常量

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. Each host application can define its own set of constants. Additional constants can be defined by the user with the Const statement. 可在代码中的任何地方使用常量来替代实际值。

容器

可包含其他对象的对象

控件

可放置在窗体上并且有其自己的一组已识别属性、方法和事件的对象。 可使用控件接收用户输入、显示输出和触发事件过程。 可使用各种方法操作大多数控件。 一些控件可进行交互(响应用户的操作),而其他控件时静态的(仅可通过代码访问)。

控件数组

共享通用名称、类型和事件过程的一组控件。 数组中的每个控件都有用于确定哪个控件识别事件的唯一索引号。

货币数据类型

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. at 符号 (@) 类型声明字符在 Visual Basic 中表示 Currency。 请参阅数据类型摘要

数据类型

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. 请参阅数据类型摘要

Date 数据类型

用于将日期和时间存储为实数的数据类型。 日期变量存储为 64 位(8 字节)数。 小数左侧的值表示日期,小数右侧的值表示时间。 请参阅数据类型摘要

日期表达式

可理解为日期(包括日期文字、看起来像日期的数字、看起来像日期的字符串和函数返回的日期)的任何表达式。 日期表达式限于可用任何组合表示 100 年 1 月 1 日到 9999 年 12 月 31 日的日期的数字和字符串。

日期存储为实数的一部分。 小数左侧的值表示日期,小数右侧的值表示时间。 负数表示 1899 年 12 月 30 日之前的日期。

日期字符串

具有由数字符号 (#) 包围起来的有效格式的任何字符序列。 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 日的日期文字,其中,应用程序的区域设置是美国英语。 使用日期字符串可最大限度提高不同国家语言之间的可移植性。

日期分隔符

Characters used to separate the day, month, and year when date values are formatted. 这些字符由系统设置或“字符”函数确定。

DBCS

使用 1 个或 2 个字节表示字符的字符集,可表示超过 256 个字符。

动态数据交换 (DDE)

用于通过在 Microsoft Windows 下运行的应用程序间的活动链接交换数据的已建立协议。

Decimal 数据类型

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 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.

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 can, however, create a Variant whose subtype is Decimal using the CDec function. 请参阅数据类型摘要

声明

列举常量、变量、程序,并指明其特征(如数据类型)的不可执行代码。 对于 DLL 过程,声明指定名称、库和参数。

设计器

在 Visual Basic 开发环境中提供视觉设计窗口。 可使用此窗口以可视化方式设计新类。 Visual Basic 具有针对窗体的内置设计器。 Visual Basic 的专业版和企业版包括针对 ActiveX 控件和 ActiveX 文档的设计器。

设计时间

在开发环境中通过添加控件、设置控件或窗体属性等操作生成应用程序的时间。 相比之下,在运行时,您像用户一样与应用程序交互。

开发环境

您进行编写代码、创建控件、设置控件和窗体属性等操作的应用程序部分。 这与运行应用程序相对照。

在运行时加载和链接到应用程序中的例程库。 DLL 是使用其他编程语言(如 C、MASM 或 FORTRAN)创建的。

停靠窗口

附加到主窗口的框架上的窗口。

文档

使用应用程序创建并具有唯一的文件名的自我包含工作。

文档设计模式

一种通常由主机应用程序通过开发人员功能区上的按钮切换的设计模式,其中鼠标与嵌入在文档中的控件进行交互以调整其位置、大小和属性,而不是激活其操作。

Double 数据类型

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 中表示 Double。 请参阅数据类型摘要

Empty

Indicates that no beginning value has been assigned to a Variant variable. “空”变量在数字上下文中表示为 0,或在字符串上下文中表示为零长度的字符串 ("")。

错误号

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.

事件源对象

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

可执行文件

可在开发环境外运行的基于 Windows 的应用程序。 可执行文件的文件扩展名为 .exe。

表达式

生成字符串、编号或对象的关键字、运算符、变量和常量的组合。 表达式可用于执行计算、操作字符或测试数据。

文件编号

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 256-511 for files accessible from other applications.

焦点

可在任何时候接收鼠标单击或键盘输入的能力。 在 Microsoft Windows 环境中,每次仅可有一个窗口、窗体或控件具有此能力。 "具有焦点"的对象通常由突出显示的标题或标题栏指示。 焦点可由用户或应用程序设置。

窗体

一个窗口或对话框。 窗体时控件的容器。 多文档界面 (MDI) 窗体还可充当子窗体和一些控件的容器。

窗体模块

Visual Basic 项目中文件扩展名为 .frm 的文件,该文件可包含窗体、其控件及控件的属性设置、常量、变量和外部过程的窗体级别声明以及事件和常规过程的图形说明。

Function 过程

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

常规过程

必须由其他过程明确调用的过程。 相比之下,将自动调用事件过程以响应用户或系统操作。

图形方法

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”

主机应用程序

支持使用 Visual Basic for Applications 的任何应用程序,如 Microsoft Excel 和 Microsoft Project 等。

图标

对象或概念的图形表示;通常用于表示 Microsoft Windows 中最小化的应用程序。 图标时最大大小为 32 x 32 像素的位图。 图标的文件扩展名为 .ico。

标识符

引用常量或变量的表达式元素。

进程内

在与应用程序相同的地址空间内运行。

可插入对象

表示自定义控件的类型的应用程序对象,如 Microsoft Excel 工作表。

Integer 数据类型

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. 百分号 (%) 类型声明字符在 Visual Basic 中表示 Integer。 请参阅数据类型摘要

内部常量

A constant provided by an application. 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.

关键字

被识别为 Visual Basic 编程语言一部分的字词或符号;例如,语句、函数名称或运算符。

行继续符

空格后加下划线 (_) 的组合,在开发环境中用于将代码的单个逻辑行扩展为两个或更多物理行。 但是,不能使用行继续符来继续字符串表达式中的一行代码。

行标记

用于标识单个代码行。 行标记可以是以字母开头并以冒号 (:) 结尾的字符的任意组合。 行标记不区分大小写,必须从第一列开始。

行号

用于识别单个代码行。 行号可以是使用该行号的模块内的唯一数字的任何组合。 行号必须在第一列中开始。

链接窗口

一个窗口,它连接到主窗口以外的其他窗口。

链接窗口框架

包含多个已链接在一起的窗口的窗口框架。

区域设置

对应于给定语言和国家/地区的信息集。 代码区域设置影响术语(如关键字)的语言,并定义区域设置特定的设置(如小数和列表分隔符、日期格式和字符排序顺序)。

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.

虽然代码区域设置和系统区域设置通常设置为相同的设置,但在某些情况下可能有所不同。 例如,在 Visual Basic 标准版和 Visual Basic 专业版中,代码未从美国英语进行转换,并且不可更改。 在此情况下,使用美国英语分隔符、格式占位符和排序顺序。

逻辑错误

可导致代码产生错误的结果或停止执行的编程错误。 例如,逻辑错误可由错误的变量名称、错误的变量类型、无限循环、比较缺陷或数组问题引起。

Long 数据类型

一个 4 字节的整数,值范围从 -2,147,483,648 到 2,147,483,647。 与 (&) 类型声明字符表示 Visual Basic 中的 Long 。 请参阅数据类型摘要

边距指示器

“代码”窗口中“边距指示器”栏中显示的图标。 边距指示器在代码编辑期间提供视觉提示。

MDI 子窗体

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.

MDI 窗体

组成多文档界面 (MDI) 应用程序的背景的超酷。 MDI 窗体是应用程序中任何 MDI 子窗体的容器。

成员

集合、对象或用户定义类型的元素。

元文件

将图像存储为图形对象(如直线、圆和多边形)而不是像素的文件。 有两类图元文件,即标准图元文件和增强图元文件。 标准图元文件的文件扩展名通常为 .wmf。 增强图元文件的文件扩展名通常为 .emf。 调整图像的大小时,图元文件比像素更准确地保存图像。

方法

作用于对象的过程。

模块

一组声明,后跟过程。

模块级

在模块的"声明"部分说明代码。 过程外的任何代码均被称为模块级代码。 必须首先列出声明,而声明后是过程。

模块变量

A variable declared outside Function, Sub, or Property procedure code. 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.

命名参数

具有对象库中预定义的名称的参数。 不用以指定顺序为每个参数提供值(使用语法除外),可使用命名参数以任何顺序分配值。 例如,假设某个方法接受三个变量:

DoSomeThingnamedarg1、namedarg2、namedarg3

通过向命名参数分配值,可使用以下语句。

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

请注意,命名参数无需在语法中按普通位置顺序显示。

NULL

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.

numeric 数据类型

任何内部数值数据类型(ByteBooleanIntegerLongCurrencySingleDoubleDate)。 请参阅数据类型摘要

数值表达式

可评估为数字的任何表达式。 表达式的元素可包括关键字、变量、常量和产生数字的运算符的任意组合。

数字类型

任何内部数值数据类型(ByteBooleanIntegerLongCurrencySingleDoubleDate)或任何 Variant 数值子类型(EmptyIntegerLongSingleDoubleCurrencyDecimalDateErrorBooleanByte)。 请参阅数据类型摘要

对象

可视为一个单元(如控件、窗体或应用程序组件)的代码和数据的组合。 每个对象均由类定义。

“对象”框

“代码”窗口左上角的列表框列出代码所附加到的窗体中的窗体和控件,或位于 “属性” 窗口顶部的列表框,该列表框列出了窗体及其控件。

对象浏览器

一个对话框,可以在其中检查对象库的内容以获取有关所提供对象的信息。

Object 数据类型

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

对象表达式

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.

对象库

A file with the .olb extension that provides information to Automation controllers (like Visual Basic) about available objects. 可以使用 Object Browser,以在其中检查对象库的内容以获取有关所提供对象的信息。

对象模块

包含特定于对象的代码的模块,如类模块、窗体模块和文档模块。 对象模块包含其关联的对象后的代码。 适用于对象模块的规则不同于适用于标准模块的规则。

对象类型

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.

对象变量

包含对象引用的变量。

形参

知道过程内传递到过程的参数所依据的变量名称。 此变量接收传递到过程中的参数。 其范围在过程结束时结束。

路径

指定目录或文件夹位置的字符串表达式。 该位置可包括驱动器规格。

圆周率

一个数学常数,约等于 3.1415926535897932。

磅的大小为 1/72 英寸。 字号通常用磅衡量。

每 14 列开始一个打印区域。 每列的宽度为选定字体磅值的所有字符的平均宽度。

Private

仅对声明它们的模块可见的变量。

过程

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

“过程”框

“代码”窗口右上角的列表框和 “调试 ”窗口,用于显示“ 对象 ”框中显示的对象识别的过程。

过程调用

代码中的语句,告诉 Visual Basic 执行某个过程。

过程级

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

请注意,模块级代码位于过程块之外。

项目

一组模块。

“项目”窗口

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.

“属性”窗口

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

property

对象的命名属性。 属性定义大小、颜色和屏幕位置,或对象的状态(如启用或禁用)等对象特征。

Property 过程

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.

Public

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.

已引用项目

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. Its Public variables are not accessible to the current project except through qualification with its project name. 只要项目之间的直接引用和间接引用不会导致整个周期,它们之间的任何组合都是有效的。

正在引用的项目

The current project. 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. 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.

注册表

在 Microsoft Windows 版本 3.1 中,OLE 注册信息和文件关联存储在注册数据库中,而程序设置存储在 Windows 系统初始化 (.ini) 文件中。 在 Microsoft Windows 95 中,Windows 注册表充当用户、应用程序和计算机特定信息(包括以前的 Windows 版本 3.1 注册数据库和 .ini 文件中包含的信息)的中央配置数据库。

资源文件

Visual Basic 项目中文件扩展名为 .res 的文件,可包含位图、文本字符串或其他数据。 通过将此数据存储在单独的文件中,可在无需编辑代码的情况下 更改信息。 仅可有一个资源文件与项目关联。

运行时错误

在代码正在运行时发生的错误。 运行时错误在语句尝试无效操作时发生。

运行时

运行代码的时间。 在运行时期间,不可编辑代码。

范围

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. 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.

种子

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.

Single 数据类型

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 中表示 Single。 请参阅数据类型摘要

排序顺序

用于对数据进行排序的排序原则,例如,字母、数字、升序、降序等。

堆栈

Visual Basic 用于在过程调用期间保留局部变量和参数的固定内存量。

标准模块

A module containing only procedure, type, and data declarations and definitions. 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 comparison of two sequences of characters. Use Option Compare to specify binary or text comparison. In English-U.S., binary comparisons are case sensitive; text comparisons are not.

字符串常量

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 数据类型

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. 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 中表示 String。 请参阅数据类型摘要

字符串表达式

计算结果为一系列相邻字符的任何表达式。 字符串表达式的元素可以包括返回字符串、字符串文本、字符串常量、字符串变量、字符串 Variant 的函数,或返回字符串 Variant (VarType 8) 的函数。

字符串文本

包含由引号包围的照字面意思解释为引号内的字符的连续字符序列的任何表达式。

Sub 过程

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.

语法检查

检查代码是否采用正确的语法的功能。 如果启用了代码检查功能,则在输入包含语法错误的代码时显示消息,并突出显示可疑代码。

语法错误

输入 Visual Basic 未识别的代码行时发生的错误。

请注意,单个关键字的语法规则在关联的帮助主题中的"语法"部分定义。 若要从开发环境内获取有关关键字的帮助,请选择关键字并按 F1。

Tab 键顺序

按 TAB 或 SHIFT+TAB 时焦点从一个字段移动到下一个字段的顺序。

时间表达式

可理解为时间的任何表达式。 这包括时间文字、看起来像时间的数字、看起来像时间的字符串和函数返回的时间的任何组合。

时间存储为实数的一部分。 小数右边的值表示时间。 例如,正午 (12:00 P.M.) 由 0.5 表示。

等于 1/20 磅的屏幕测量单位。 缇是独立于屏幕的单位,用于确保屏幕应用程序中屏幕元素的放置和比例在所有显示系统上均相同。 每逻辑英寸有约 1440 缇,或每逻辑厘米(打印是测量一英寸或一厘米的屏幕项的长度)有约 567 缇。

类型声明字符

附加到变量名称的字符,表示变量的数据类型。 默认情况下,变量的类型为 Variant,除非模块中存在相应的 Deftype 语句。

类型库

另一个文件内包含可用于自动化的公开对象、属性和方法的文件或组件。 对象库文件 (.olb) 包含类型库。

Unicode

国际标准化组织 (ISO) 字符标准。 Unicode 使用允许 65,536 和不同字符空格的 16 位(2 字节)编码方案。 Unicode 包括标点符号、数学符号、丁贝符的表示,并由大量的控件可用于将来的扩展 。

通用日期格式

通用日期格式为 #yyyy-mm-dd hh:mm:ss#。 但日期组件 ( #yyyy-mm-dd#) 和时间组件 ( #hh:mm:ss#) 均可单独表示。

用户定义类型

Any data type defined using the Type statement. 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 any type can be included within user-defined types. 请参阅数据类型摘要

变量

可包含可在程序执行期间修改的数据的命名存储位置。 每个变量都具有在其范围内唯一标识该变量的名称。 可指定数据类型,也可不指定。

变量名称必须以字母字符开始;在相同的范围内必须是唯一的;不可超过 255 个字符,并且不可包含嵌入期间或类型声明字符。

Variant 数据类型

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 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. 请参阅数据类型摘要

变量表达式

计算结果可以是数字、字符串或日期数据的任何表达式,以及特殊值 EmptyNull

监视表达式

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. The Watch window displays the value of an expression within a given context. Watch expressions are not saved with your code.

z 顺序

窗体上的控件沿窗体的 z 轴(深度)的视觉分层 。 z 顺序确定哪个控件位于其他控件的前面。

另请参阅

支持和反馈

有关于 Office VBA 或本文档的疑问或反馈? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。