要使用 Redim 重新定义数组的上下标
如: redim ct(2) 或 redim ct(0 to 1)
ct(0) = 15
ct(1) = 20

解决方案 »

  1.   

    肯定可以的啦!!
    dim ct() as byte
    redim ct(15) as byte
      

  2.   

    需要用redim定义一下,没问题,我才用过。
      

  3.   

    Dim ct() as byte只是声明,并没有分配内存.动态数组一定要REDIM才能用.
      

  4.   

    就是redim 啊。没什么好说的大家都说了那么多了。
      

  5.   

    有一种用法不知道大家有没有用过。
    Dim ct() as string
    Dim strCt as stringct=split(strCt,"/",-1,vbTextCompare)
    这样数组中的值就是动态加入的。
      

  6.   

    有谁知道如何动态产生多位数组(不用Varient)?