What's the most efficient way to merge two collections together in VBA, so that I have a 3rd Collection containing all of the items from the first two?
Read this article, which compares For
vs For Each
loops when iterating arrays, vs. when iterating object collections.
Bottom line:
For
loops to iterate arrays.For Each
loops to iterate collections.So, iterate your collections with For Each
loops, and in these loops Add
the items to your 3rd collection.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With