1.数字类型
整形: Integer
长整形: Long
单精度浮点型: single
双精度浮点型: Double
货币型: Currency
字节型: Byte
2.逻辑判断: Boolean
如:Dim testBLn As Boolean
testBLn = True
testBLn = False
它的存储也是十六位,只能取: true or False
3.日期 Date
64位
如:
Dim testDate As Date
testDate = #12/5/96#
testDate = #1996-12-5 12:30 PM#
testDate = #96,12,5#
testDate = #January 1,1993#
testDate = #1 JAn 93#
或:
4.字符串 String
如声明长度为100字符的字符串
Dim strName As String * 100
5.对象 Object
32位 用set语句
如:Sub Form_Click()
Dim Temp As Object
Set Temp = Form1
End Sub
6.Variant类型
见下贴
阅读(1217) | 评论(0) | 转发(0) |