Hello. I have a user defined type that has a member variable that is a string array. I cannot seem to get an instance of that UDT to have it's array member be assigned an array from a FunctionThatReturnsAnArray("blah").
The semi-pseudocode below is a simplified version of what I'm trying to do. Is this a known limitation? Is there something I can do to get it to work or do I have to make an intermediate array to accept the out put of the FunctionThatReturnsAnArray("blah") and then loop through it adding its contents one by one to the UDT's array?
The semi-pseudocode below is a simplified version of what I'm trying to do. Is this a known limitation? Is there something I can do to get it to work or do I have to make an intermediate array to accept the out put of the FunctionThatReturnsAnArray("blah") and then loop through it adding its contents one by one to the UDT's array?
Code:
Type Foo
sArray() as string
End Type
Public Function fTest
'instantiate a standard array vs an array that is part of a UDF...
Dim sAnotherArray() as string
'vs...
Dim myFoo as Foo
'attempt to assign an array returned from a function to the two arrays...
sAnotherArray = FunctionThatReturnsAnArray("blah") 'This WORKS
'vs...
myFoo.sArray = FunctionThatReturnsAnArray("blah") 'This DOESN'T
End Function