View Single Post
  #5   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:
I think what you are trying to do with this -


Function foo10(ParamArray x())
z = UBound(x(0)(1))
End Function



is really -

Function foo10(ParamArray x())
z = UBound(Application.Index(x(0), 1))
End Function

or depending which dimension -

z = UBound(Application.Index(x(0), 2))

Regards,
Peter T


Thanks for responding. What I'm really trying to do is understand the
following line in the Locals window when z = UBound(x(0)(1)) gives a
"Subscript out of range" error message:

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

Thanks,
Alan Beban