Thread: Ubound matrix
View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.programming
Peter T Peter T is offline
external usenet poster
 
Posts: 5,600
Default Ubound matrix


"Alan Beban" wrote in message
...
Hi Chip,

Chip Pearson wrote:


Conversely, I don't like the idea of using a For Next on an array. For
example, I do not like the following code:

Dim Arr(1 To 3)
Dim V As Variant
Arr(1) = 11
Arr(2) = 22
Arr(3) = 33
For Each V In Arr
Debug.Print V
Next V
. . .

What are the objections to it?

Alan Beban


Not sure if this amounts to an objection but there's something inconsistent
between
For Each V In Arr
&
For each cell in rng

namely, the for each loop of the variant goes down rows then across columns,
in contrast to a for each loop of the range area which goes across columns
then down rows.

Regards,
Peter T