View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Bernie Deitrick Bernie Deitrick is offline
external usenet poster
 
Posts: 5,441
Default about ARRAY variable

Myrna,

I have never seen any documentation as to how Excel moves through arrays
when 'For Eaching' them, but in my experience, it always starts at the lower
bound and progresses up - the two subs that I posted return them in the same
order. Seems to work that way with cells, worksheets, workbooks, etc.

Of course, under closer questioning, I would admit "If Myrna doesn't know
for sure, then I certainly don't!" ;-)

Bernie

"Myrna Larson" wrote in message
...
Hi, Bernie:

If the index is needed, I would certainly use that index as the variable

in
the For/Next loop. My problem with 'For Each' is that I'm not completely
confident as to the order in which the members of the collection are
processed. Does it always start at the bottom and move up, or from the top
moving down? I haven't seen any documentation on this point, have you?