View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Tom Kreutz Tom Kreutz is offline
external usenet poster
 
Posts: 15
Default Determining the size of an input array

Dear J.E.,

May your offspring and the all the successive generations that follow
be richly blessed!

(Oh yeah, and thanks a TON!)

Tom


JE McGimpsey wrote:
One way:

Public Function foo(ByRef bar As Excel.Range) As Variant
foo = "Rows: " & bar.Rows.Count & vbNewLine & _
"Columns: " & bar.Columns.Count
End Function


In article ,
Tom Kreutz wrote:

Dear Folks,

In Visual Basic, how does one determine the size of an array (range?)
being passed in from Excel? For example, if I wanted to write my own
version of SUM(), how would I know the size/length of the range that the
user has chosen?

Many thanks,

Tom Kreutz