请赐教如何用控件数组做函数参数,我按照使用一般数组的方法好像不行.

解决方案 »

  1.   

    我用一个函数改变shape数组的位置,程序是这样的:Private Sub Form_Click()
        shapeselect Shape1()
    End SubPrivate Sub shapeselect(shapeC() As Shape)
        For i = 1 To 4
            shapeC(i).Shape = i
        Next
    End Sub错误为:缺少数组或用户定义类型
      

  2.   

    Private Sub Command1_Click()
        SetCaption Shape1
    End SubPrivate Sub shapeselect(shapeC As Object)
        Dim i As Long
        For i = 0 To 3
            shapeC(i).Caption = i
        Next i
    End Sub
      

  3.   

    Private Sub Command1_Click()
        SetCaption Shape1
    End SubPrivate function SetCaption(byref shape as variant)
    dim i as integer
       for i=0 to shape.count-1
          shape(1).top=11
       
       next i
    End Sub