手抄报 安全手抄报 手抄报内容 手抄报图片 英语手抄报 清明节手抄报 节约用水手抄报

Excel VBA-----之基本语法

时间:2024-10-25 13:33:06

1、一、变量和常量:1、常量、变量的基本语法:Sub fun()Const pi = 3.14 '常量定义格式:Const 常量 =常量值Debug.Print piDim a As Integer '变量定义格式:Dim 变量 AS 类型Dim b As Integera = 10b = 3Debug.Print a * b

Excel VBA-----之基本语法

2、允许使用未定义的变量,可以进行设置:

Excel VBA-----之基本语法

3、数据类型:Integer:整型 %Single:单精度 !Double:双精度 #Long:长整型 &String:字符 $Currency:货币型 @如下图所示,并可利用简写进行快速定义。

Excel VBA-----之基本语法
Excel VBA-----之基本语法
© 手抄报圈