How to work around arrays...
Hello all,
I am hoping that somebody can give me an idea about how one can work
around the fact that arrays can not be made "public variables"
availabe to other subs.
Right now I check the records on a worksheet and count the records in
every counry. Then I write this number into an "array of country
details" using a simple loop. This array contains many properties for
each country along with the number that I write into the array for
each country.
The problem comes when I try to pass this array to a sub which is
supposed to again use a loop to write the data to a worksheet.
Obviously this won't work. And it's ashame, because the loop is a real
elgant and easy of doing this!
One possible solution is to write the data to a worksheet and then
read from the worksheet when I am read to display the data. But this
is a little ugly. Do I have to create some kind of custom object so
that the array is always available throughout my project?
Thanks in advance for the tips!
JP
|