为什么类模块中不能声明public的数组呢?
不明白这种数组是实现的,如下:
treeview的treeview1.Nodes(1).Text="abc"
combo的Combo1.List(1)="abc"假设我要做一类模块叫class,其中含有一type Student,Student中有XH、Name、Sex等成员,
我能够通过class.Add方法添加Student,通过class.Student(i).Name="Li ming"来赋值等等。
本人基础不扎实,如果问题提得不好,请更正指教,谢!

解决方案 »

  1.   

    class1:
    Private a(10) As String
    Public Property Get arrA(ByVal index As Integer) As String
            arrA = a(index)
    End Property
    Public Property Let arrA(ByVal index As Integer, ByVal vNewValue As String)
            a(index) = vNewValue
    End Property
    form:
    Private Sub Command2_Click()
       Dim kk As Class1
       Set kk = New Class1
       kk.arrA(2) = "3"
       Debug.Print kk.arrA(2)
    End Sub
      

  2.   

    谢谢,我在这里找到答案了。
    http://community.csdn.net/Expert/topic/3037/3037274.xml?temp=.2789728flyingZFX(★我飞★我飞★我飞呀飞★) 
    我是第1次发贴,技术区与非技术区的区别、分数我不知道是怎样的,见谅.