RAYLWARD102
Well-known Member
- Joined
- May 27, 2010
- Messages
- 529
Have many working functions returning one 2D array; wondering how I could return
2x 2D arrays? Example doesn't work; intended to show you what I'm trying to do
2x 2D arrays? Example doesn't work; intended to show you what I'm trying to do
Code:
Sub testFunction()
Dim t As Variant
Dim a As Variant
Dim b As Variant
Dim j() As Variant
ReDim t(0 To 2, 0 To 2) '2d array
j = SomeFunction(t)
a = j(0)
b = j(1)
End Sub
Function SomeFunction(Input2DArray As Variant) As Variant()
ReDim SomeFunction(0 To 1)
SomeFunction(0) = Input2DArray
SomeFunction(1) = Input2DArray
End Function
Last edited: