im having some trouble taking values from a 3 dimensional array and putting them into one string. for some reason my loop is only reading the first value (0,0,0) and not moving on to the second (0,0,1)
this is not all the code just the main looping bit
Code: Select all
checkarray(0, 0, 0) = 2
checkarray(0, 0, 2) = 3
Dim str As String
Dim x, y, z As Integer
x = 0
y = 0
z = 0
str = ""
Do
str = str & " "
str = str & checkarray(x, y, z)
Lbl_debug2.Text = z
If z < 2 Then z += 1
If z = 2 Then
y += 1
z = 0
End If
If y < 2 Then y += 1
If y = 2 Then
x += 1
z = 0
y = 0
End If
If x = 2 Then
Exit Do
End If
Loop
Lbl_debug.Text = str