LamerThanU
Technical User
Well i guess ill start with what code i have and work from there...
zNum = 0
x2 = 0
y2 = 0
z2 = 0
Do
Do
Do
myArray(x2, y2, z2) = zNum
If zNum = txtNum.Text Then
GoTo subEnd
End If
z2 = z2 + 1
zNum = zNum + 1
Loop Until z2 = 99
z2 = 0
y2 = y2 + 1
Loop Until y2 = 99
y2 = 0
z2 = 0
x2 = x2 + 1
Loop Until x2 = 99
subEnd:
txtX2.Text = x2
txtY2.Text = y2
txtZ2.Text = z2
Ok, if you havent already figured it out, im filling about 970 thousand elements with whatever math alg but for now im just using x++. if i get rid of the if...end if, all 970k elements are filled in a split second but i dont know how to test or search for a specific element number with out the if...end if which you probly know slows it down alot. it takes about 45 secs to test up to 350k elements.
my question is... can i fill the array (which takes less than a second) and then find a particular number based on a number i type in a text box with some kind of search, then pass the array numbers x2,y2,z2 to 3 text boxes like before? my goal is to be able to search all 970k elements in 10 secs or less.
thank you in advance for any help... hopefully there is a solution it is just beyond me.
zNum = 0
x2 = 0
y2 = 0
z2 = 0
Do
Do
Do
myArray(x2, y2, z2) = zNum
If zNum = txtNum.Text Then
GoTo subEnd
End If
z2 = z2 + 1
zNum = zNum + 1
Loop Until z2 = 99
z2 = 0
y2 = y2 + 1
Loop Until y2 = 99
y2 = 0
z2 = 0
x2 = x2 + 1
Loop Until x2 = 99
subEnd:
txtX2.Text = x2
txtY2.Text = y2
txtZ2.Text = z2
Ok, if you havent already figured it out, im filling about 970 thousand elements with whatever math alg but for now im just using x++. if i get rid of the if...end if, all 970k elements are filled in a split second but i dont know how to test or search for a specific element number with out the if...end if which you probly know slows it down alot. it takes about 45 secs to test up to 350k elements.
my question is... can i fill the array (which takes less than a second) and then find a particular number based on a number i type in a text box with some kind of search, then pass the array numbers x2,y2,z2 to 3 text boxes like before? my goal is to be able to search all 970k elements in 10 secs or less.
thank you in advance for any help... hopefully there is a solution it is just beyond me.