Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Using Collections

Hi,
I have 4 collections called c2, c3, c4 and c5. I want to
cycle through (and perform actions on) all the items
contained in each collection. How do I do this? Is
there a way to make a collection of my collections?

Thanks,
Kerry
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Using Collections

Kerry,

You can create a collectionof collections, and then do a double
For loop to loop through all the items. For example,

Dim Coll As Collection
Dim V As Variant
Dim All As Collection
Set All = New Collection

All.Add C1
All.Add C2
All.Add C3
All.Add C4
All.Add C5

For Each Coll In All
For Each V In Coll
Debug.Print V
Next V
Next Coll


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"Kerry" wrote in message
...
Hi,
I have 4 collections called c2, c3, c4 and c5. I want to
cycle through (and perform actions on) all the items
contained in each collection. How do I do this? Is
there a way to make a collection of my collections?

Thanks,
Kerry



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
minimize the file size in a ppt with collections of many pivot tables chermaine Excel Discussion (Misc queries) 1 December 30th 05 11:04 AM
Collections Lookups Dave Curtis[_3_] Excel Programming 1 December 3rd 03 09:15 AM
Comparing Collections Tom Ogilvy Excel Programming 1 September 17th 03 06:15 PM
Intersecting/Unioning Collections Robbie[_2_] Excel Programming 3 September 13th 03 08:09 PM
Creating Collections 'on the fly' Dave Peterson[_3_] Excel Programming 4 September 6th 03 07:20 AM


All times are GMT +1. The time now is 10:25 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"