Sub SubroutineA()
Dim Array(2,2)
Array = GetInfo()
End Sub
Function GetInfo()
Dim FunctionArray(2,2)
{input all data into array}
GetInfo = FunctionArray()
End Function
我能得到的任何帮助都会很棒,因为这对我来说很新鲜。
答案 0 :(得分:5)
Cheran Shunmugavel指出了正确的方向,但他的解释含有一种模糊性。说清楚:
Sub SubroutineA()
Dim Arr ' <<<--- do not use parenthesis here and do not use
' the reserved keyword "Array"
Arr = GetInfo()
End Sub
Function GetInfo()
Dim FunctionArray(2,2)
' {input all data into array}
GetInfo = FunctionArray ' <<<--- do not use parenthesis here
End Function