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 VBA enhancements

LesHurley wrote:
Rewrite of the original post to correct typos:

-- 1) Provide a function similar to UBound() and obj.Rows.Count that would
work

on either Excel Range objects or VBA arrays as arguments to Function Procedures, and
2) a function similat to Static, call it Static2, for which a Static2 variable used in a re-entrant procedure like xx(xx(x,y),xx(w,z)) passes out of existance when a VBA procedure returns control to Excel, or
3) a function, call it IsRangeObject, that can be used to test if an
argument to a VBA procedure is an Excel Range Object, as opposed to a VBA
array.



You coud use it in Excel, for example, instead of a #Value error, to tell . . . .


You could use what in Excel? You proposed 3 functions. If you mean 1)
above, how would you implement it? I.e., if

Function foo1(iArg, Optional n = 1)

returned the upper bound of the nth dimension if iArg were an array, or
the number of rows if iArg were a multi cell range and n=1, or the
number of columns if iArg were a multi-cell range and n=2, how would
that affect the MMult call?

Alan Beban