VB怎么定义动态控件数组

如题目

Dim aShape(10#) As Shape
for i=0 to 10#-1
Set aShape(i) = Controls.Add("VB.Shape", Replace("Shape" + Str(i), " ", ""))
Next

注意,定义完了以后要像上面一样将数组初始化

温馨提示:答案为网友推荐,仅供参考
相似回答