1、显示声明: Option Explicit
2、常量: Const 常量名 As 数据类型 = 值
3、变量:
Dim|Private|Public 变量名 As 数据类型
Dim 变量名 As String*n
4、数组:
------------------------------------------------------------------------------------------------------
Dim|Private|Public 数组名(n) As 数据类型(下标值:0~n)
Dim|Private|Public 数组名(m To n) As 数据类型(下标值:m~n)
------------------------------------------------------------------------------------------------------
Dim 数组名() As 数据类型
ReDim 数组名(n)
------------------------------------------------------------------------------------------------------
Dim 变量名 As Variant
变量名 = Array(常量1, ...)
变量名(1)的值为“常量1”[以此类推]
------------------------------------------------------------------------------------------------------
choose(变量名, 常量1, ...)
变量值为1时返回“常量1”[以此类推]
------------------------------------------------------------------------------------------------------
5、结构体:
Private|Public Type 结构体名
成员名 As 数据类型
...
End Type
------------------------------------------------------------------------------------------------------
Dim|Private|Public 变量名 As 结构体名
变量名.成员名
Dim|Private|Public 数组名(n) As 结构体名
数组名(n).成员名
------------------------------------------------------------------------------------------------------