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
Post a Comment