vb 中type格式及作用?

来源:百度知道 编辑:UC知道 时间:2024/05/25 19:31:39

自定义结构用的

Type STUDENT
name as string
old as byte
sex as string*2
address as string
tel as string
End Type

然后进行定义(比如~~)

dim stu as STUDENT

stu.name = "诸葛亮"
stu.old = 26
stu.sex = "男"
stu.address = "隆中"
stu.tel = "1234567"

[Public/Private] Type tName
item1 As String
item2 As String
......
End Type

tName.item1 = ...
tName.item2 = ...
...