arrays - For loop to last value in matrix -


i looping down each row in array, , array variable size 76 or columns , 1000 rows. but, matrix not full, , rows not fill 1,000. however, need keep matrix size, may grow in future. syntax going until hit last element in array? stuck with. thanks

do while <= 1000 

you want loop until array value isempty().

option base 0 dim long dim myarray(75, 999)  while not isempty(myarray(i, 0))     = + 1 loop 

or

option base 1 dim long dim myarray(76, 1000) = 1 while not isempty(myarray(i, 0))    = + 1 loop 

shai rado correct should use dynamic array. excel vba array tutorial


Comments

Popular posts from this blog

testing - Detect whether test has failed within fixture -

AbotX : How do you create a parallel crawler that stays on and can be added to at run time from new requests -

android - Create single AAR file from multiple modules using Gradle -