access an array stored inside another array excel vba -


i create array inside function (arraya), function (store). function store return array a, , store functions return value in larger array arrayb. after print out each of arraya's elements stored in arrayb element (1).

please help, many thanks, code below.

dim arra() variant dim arrb() variant  redim arrb(1)  arrb(1) = store(arra)  = 1 ubound(arrb(1) debug.print arrb(1)(i) next  function store(a() variant)  redim a(1 3, 1 3)  a(1,3) = "1" a(1,2)="2"  store =  end function 

to print contents of arra you'll have iterate through this:

for = 1 ubound(arrb(1))    j = lbound(arrb(1), 2) ubound(arrb(1), 2)       debug.print arrb(1)(i, j)    next next 

the 2nd argument of lbound/ubound functions used choose dimension want; in case, want 2nd 1 because outer for going through 1st.


Comments

Popular posts from this blog

java - activate/deactivate sonar maven plugin by profile? -

python - TypeError: can only concatenate tuple (not "float") to tuple -

java - What is the difference between String. and String.this. ? -