Thread: Range or Array?
View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.programming
Alan Beban[_2_] Alan Beban[_2_] is offline
external usenet poster
 
Posts: 783
Default Range or Array?

More precisely, I believe that if the array has been passed to a sub
procedure or a function, it will always be an array contained within a
Variant variable; I believe there is no syntax equivalent to:

Function junk1(myInput As Variant()). So myInput must always be declared as

Function junk1(myInput As Variant) or its equivalent

Function junk1(myInput)

in order to accept an array. So whatever array is passed to the
function, whether it starts out as an array within a Variant variable,
or a Variant() type of array, or an Integer() type of array, or
whatever, it ends up in the function as an array contained within the
Variant variable (in this case, myInput).

Alan Beban

Alan Beban wrote:
. . .
But neither this nor Bob Phillips's version below distinguishes between
a Variant() array and an array contained within a Variant Variable. I
don't know of a way to do that if the array is passed to a sub procedure
or function, but I have difficulty seeing why one would care.