condition in array

wladqe

New Member
Joined
Mar 13, 2011
Messages
3
hello, i have one questions,

Code:
condition = 50

For Each l In ccc
    If l > condition Then
        l = l
        With aaa
        .Add Item:=l
        End With
    Else:
        l = l
        With bbb
        .Add Item:=l
        End With
    End If
    
Next
ccc is collection
aaa and bbb is array
I need separate array with condition and fill values that meet condition to array aaa and values that are not valid for condition fill to array bbb.
array is dynamic and randomly generated.
Please can anybody help me ?
 

GlennUK

Well-known Member
Joined
Jul 8, 2002
Messages
11,298
You don't add to arrays like that. As you seem to already be working with collections can I ask why you aren't using collections for aaa and bbb? And why are you doing "l=l" in your code? And why use With to enclose a single statement?
 

Forum statistics

Threads
1,085,471
Messages
5,383,889
Members
401,862
Latest member
Herbalgiraffe

Some videos you may like

This Week's Hot Topics

Top