读书人

VBA 怎么定义数据结构

发布时间: 2012-04-26 14:01:31 作者: rapoo

VBA 如何定义数据结构
如题,请教,在excel里怎么定义个数据结构,比如要存储的内容有ID,Item,path, data这些项目

[解决办法]
type typData
id as string
item as String
Path as string
Data as string
end type

dim vItem() as typData


[解决办法]
excel ,宏菜单 VB编辑器 添加一个模块,在模块里写
public type typData
id as string
item as String
Path as string
Data as string
end type


[解决办法]
啥叫动态的数据结构?

动态数组?

dim X() as TypData

N=a+b+c'计算出你需要的单元数
redim x(n-1)
[解决办法]
dim x() as typData
N=a+b+c '计算出你需要的单元数
redim x(n-1)

读书人网 >VB

热点推荐