我定义一条记录如下:
Type Test
      a1 as string
      a2 as string
End Type假设我有很多的Test变量,比如Test1,Test2,Test3..........
dim Test1 as Test
dim Test2 as test
.....
dim Test10 as Testfor i=1 to 10
    print Controls(Test & str(i)).a1
next但这样运行有错误,请问如何解决?

解决方案 »

  1.   

    很多这样的变量,那就可以定义一个TEST数组了,否则不能循环取。====================
    免费的学习交流网站,欢迎大家访问!
    http://www.j2soft.cn/
      

  2.   

    dim a(9) as Testfor i=1 to 10
        print Controls(Test & str(i)).a1
    next
      

  3.   

    dim test(9) as Testfor i=0 to 9
        print test(i).a1
    next
      

  4.   

    定义成数组
    dim test(9) as test
    for i=0 to 9
      print test(i).a1
    next