how to perform "for each" statement in Visual Basic?

Hi there is an for each statement in ASP, I wonder how do I do it in Visual Basic, thank you
ASTronusAsked:
Who is Participating?
 
deightonConnect With a Mentor progCommented:
one example,

Dim x(1 To 2) As Long

Dim vx

x(1) = 6
x(2) = 8

For Each vx In x

    Print vx
   
Next
0
 
rpaiCommented:
Dim ArrNames(2) as String
Dim vKey as Variant
ArrNames(0)="AAA"
ArrNames(1)="BBB"
ArrNames(2)="CCC"

For Each vKey in ArrNames
   Debug.Print vKey & vbCrlf
Next
0
 
ASTronusAuthor Commented:
I thought it don't have it, i'm so bad
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.