sub test(nvalue() as string)end subtest m16pf

解决方案 »

  1.   

    sub test(m16pf()as string)end sub
      

  2.   

    呵呵,测试通过
    Private Sub test(abc() As String)
    Dim i As Integer
    Dim j As Integer
    i = UBound(abc)
    For j = 1 To i
       MsgBox abc(j)
    Next jEnd Sub
    Private Sub Command1_Click()
    Dim abc(1 To 3) As String
    abc(1) = 3
    abc(2) = 2
    abc(3) = 1
    Call test(abc)End Sub
      

  3.   

    Private Sub test(abc() As String)
    这代码中的abc()可以用任何xxx()代替,就象阿甘写的
      

  4.   

    这里还有一个数组参数的例子,希望有帮助!
    Private Sub ParamTest(ByVal sMsg As String, ParamArray nArray())
        Dim nLoop As Integer
        
        For nLoop = LBound(nArray) To UBound(nArray)
            Debug.Print sMsg & CStr(nArray(nLoop))
        Next nLoop
    End Sub
      

  5.   

    解决了,非常感谢combread,也很感谢阿甘和天堂小子,以后还请多多指教.给分