For Each now iterates in index order!

I just noticed in the documentation that For Each now iterates through items by index order (item 1, item 2, etc). This is very useful and lets you eliminate a lot of Ubound code before each For…Next loop.

(I may just be late to the party here; I can’t tell when the change was made. The documentation for For Each used to contain an explicit warning that it did not necessarily go in any particular order.)

It has worked that way since For Each was introduced… but was not documented to be guaranteed to do so … until now.

  • Karen

Which is why I never depended on it to behave like that. :wink: