sam314159
01-06-2011, 01:57 PM
I have a small VBA project that consists of a userform and 5 different modules. Each one of the modules processes a certain set of data and produces results.
As an afterthought, I wanted to create a single array (or some kind of data storage structure) that can hold all the data produced by the 5 different modules. So at the end of the run, I would like to have an array that contains the data produced by all the modules.
Here is what I need help with please:
1. Is there a way to create a global array in a project that is recognized by the 5 modules and is not just defined in one context?
2. Is an array the best way to do this? Seems like VBA arrays get a little more complicated when you don't know the exact number of elements and in my case, I don't. I was hoping for something similar to a java Vector with methods such as .addElement but I can't find that for VBA, does something similar exist?
Thanks guys.
As an afterthought, I wanted to create a single array (or some kind of data storage structure) that can hold all the data produced by the 5 different modules. So at the end of the run, I would like to have an array that contains the data produced by all the modules.
Here is what I need help with please:
1. Is there a way to create a global array in a project that is recognized by the 5 modules and is not just defined in one context?
2. Is an array the best way to do this? Seems like VBA arrays get a little more complicated when you don't know the exact number of elements and in my case, I don't. I was hoping for something similar to a java Vector with methods such as .addElement but I can't find that for VBA, does something similar exist?
Thanks guys.