View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
joeu2004 joeu2004 is offline
external usenet poster
 
Posts: 2,059
Default Best way to result more than 1 result?

On Jan 18, 2:46*am, joeu2004 wrote:
Alternative implementations, avoids Worksheet.Transpose.
*Difference depends on what your Option Base is.


Sorry about the incessant postings. Not thinking clearly.

myRow() can be simplified. Also note that myArray can be typed. But
as a Variant, each element can assigned a different type, e.g. number,
text and boolean.

------

Option Base 1

Function myRow()
'return __row__ array
Dim myArray(1 To 3)
myArray(1) = 1: myArray(2) = 2: myArray(3) = 3
myRow = myArray
End Function

-----

Option Base 0

Function myRow()
'return __row__ array
Dim myArray(0 To 2)
myArray(0) = 1: myArray(1) = 2: myArray(2) = 3
myRow = myArray
End Function