数据类型
VBA中的数据类型可分为两种
示例
String
Sub Main
Dim s as string
s = "Hello"
msgbox(s)
End Sub
Single和Double
Sub Main
Dim a as Single
Dim b as Double
a = /
b = /
MsgBox(a) '3.333333'
MsgBox(b) '3.33333333333333'
End Sub
注:VBA注释符号是单引号
参考链接:https://www.guru99.com/vba-data-types-variables-constant.html