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 ParamArray debug anomaly

Peter T wrote:

Perhaps I'm missing something but I don't see any anomaly. I would expect
this line to fail (where x is the ParamArray)
z = UBound(x(0)(1))

x(0) is the first and, in your example, only element in the paramArray.
Also in the example, this sole 'element' in the paramArray is a 2d array
x(0)(1) in effect refers to the top row of the 2d array, NOT an entire
array, hence my Index example.


What it comes down to is my failure to observe that the line in the
Locals window

x(0)(1) Variant(1 to 4)

did not indicate that x(0)(1) was a Variant() array. This is the first
time in the dozen or so years that I have been fooling with this stuff
that I have had occasion to recognize that a Variant variable can refer
to not only a value or an array, but a set of multiple values that do
not constitute an array.

Thanks very much for your thorough response.

Alan Beban