View Single Post
Old Mar 2nd, 2005, 4:19 PM   #2
Rory
Expert Programmer
 
Rory's Avatar
 
Join Date: Jan 2005
Location: London
Posts: 542
Rep Power: 4 Rory is on a distinguished road
Send a message via MSN to Rory
Right, first of all if that's your code you'll get an ambiguous name error, and anyway it's a good idea to avoid keywords in the variable names. Also, VB is right, the control variable in the enumerator must be a variant.
Personally I would do it like this, which is more VB6 than .NET-ish
Public MyArray(2, 2) As String
Public Sub Main()
Dim MyEnum As Integer
Dim MySubEnum As Integer
For MyEnum = LBound(MyArray, 1) To UBound(MyArray, 1)
    For MySubEnum = LBound(MyArray, 2) To UBound(MyArray, 2)
        Debug.Print MyArray(MyEnum, MySubEnum)
    Next
Next
End Sub
Hope this helps
Rory is offline   Reply With Quote