Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I want to cycle through a collection and add members on the basis of whether
they exist. For example: Function Test(Optional M1, Optional M2, Optional M3) Dim Group as New Collection With Group If Not IsMissing(M1) then .Add M1 If Not IsMissing(M1) then .Add M1 If Not IsMissing(M1) then .Add M1 end with .. . . End Function Is it possible to build a reference such that I could use a loop: For i=1 to 10 If Not IsMissing("M" & i) then Group.Add "M" & i next i Is there a function that would tell VBA to recognize the string as a variable (or object, etc.)? This is quite simple to do in SAS. Thanks, Chad |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Cannot remove item from collection | Excel Programming | |||
Collection Object, 255 item limitation | Excel Programming | |||
Retrieving a Collection Item | Excel Programming | |||
Add Unique item to Collection | Excel Programming | |||
Removing an Item From a Collection | Excel Programming |