2种方法
1. 直接赋值,此法只适合和小数组
Dim myArray() as Integer ={1,2,3,4,5}
或Dim myArray(5)as integer
myArray(0)=1
myArray(1)=2
myArray(2)=3
myArray(3)=3
myArray(4)=5
myArray(5)=6
2.最常用的for next循环赋值
Dim myArray()as integer
For intCount as Integer= 0 to 5
myArray(intCount)=你要赋值的东西
Next
如果你要每个都不同那就这样:
Dim myArray()as integer
Dim FuZhi as integer
For Fuzhi as 0 to 5
For intCount as Integer= 0 to 5
myArray(intCount)=fuzhi
Next intCount
Next fuzhi
温馨提示:答案为网友推荐,仅供参考