Hi, folks!
As I understand it, arrays don't scope quite the same way that non-arrayed variables do. So.....even with an array declared as "Public", an array that gets its values in one procedure doesn't necessarily carry those values into another procedure, even in the same module.
Is that correct? I have a two-dimensional dynamic array declared "Public". It gets Redim Preserve in one procedure, goes to another procedure (in the same module) in which the array gets its values.....but when I try to use to those array values in a 3rd procedure (in the same module), my array values seem to get re-set to 0.
I'm not sure why this is happening because there are no intervening lines of code that cause the array to be re-set.
Any suggestions on how to hold on to array values so they can be accessed like regular Public or Global variables?
Thanks so much, folks. You've been so helpful in the past.
Respectfully,
GWhiz
As I understand it, arrays don't scope quite the same way that non-arrayed variables do. So.....even with an array declared as "Public", an array that gets its values in one procedure doesn't necessarily carry those values into another procedure, even in the same module.
Is that correct? I have a two-dimensional dynamic array declared "Public". It gets Redim Preserve in one procedure, goes to another procedure (in the same module) in which the array gets its values.....but when I try to use to those array values in a 3rd procedure (in the same module), my array values seem to get re-set to 0.
I'm not sure why this is happening because there are no intervening lines of code that cause the array to be re-set.
Any suggestions on how to hold on to array values so they can be accessed like regular Public or Global variables?
Thanks so much, folks. You've been so helpful in the past.
Respectfully,
GWhiz