Hello to all,

I have a macro that generates 2 arrays, but since I need to use the same code
several times, I want to convert it to a function. The input of the function should
be a variant array(n,m).

How should be done the function in order to get as ouput the 2 arrays?
This is how the macro looks like
Sub Arrays1_2()
'
'
'Some code

Array1 = (....)
Array2 = (....)

End Sub
This is what I have so far for the function.
Function Arrays1_2(x as variant)
'
'
'Some code

Array1 = (....)
Array1 = (....)

End Function
Thanks for any help