I use arrays to store steam properties in accordance with this pressure. Right now I have properties of exactly 9 pressures, so I am using a static array. I would like to be more flexible, so I would like to switch to dynamic arrays.
When I use ReDim foo(1 to i, 1 to 10)in a loop, I completely lose all data except the last line.
When I use ReDim Preserve foo(1 to i, 1 to 10)or ReDim Preserve(i,10), the program gives the error "Runtime Error" 9 ": index out of range." igoes from 1 to 9.
How can I add a row / column to an array full of data without losing them?
source
share