Private Type My_Have   '定义         
    have1 As Integer
    have2 As Integer
    have3 As Integer
    have4 As Integer
End TypePublic MyYn As My_Have '定义变量MyYn.have1 = 0 ' 赋值    
 

解决方案 »

  1.   

    private type myType
            mstr as string
            nInt as integer
            bBool as boolean
    end typedim testType(0 to 10) as myType 
    '以下是赋值语句
    for i=0 to 10
        with testtype(i)
             .mstr="aaa"
             .nInt=i
             .bBool=false
        end with   
    next
      

  2.   

    不是啊,我要的是结构组Private Type My_Have()   '定义         
        have1 As Integer
        have2 As Integer
        have3 As Integer
        have4 As Integer
    End TypePublic MyYn As My_Have() '定义变量MyYn(0).have1 = 0 ' 赋值 
    MyYn(1).have1 = 1 
    MyYn(2).have1 = 56这样可以吗???