Hi all,
As the title says, I am having an issue accessing a Publicly declared multidimensional array in another module. Sorry if this seems obvious or badly written, I'm new to VBA. My project is set out as below:
Module 1 - Contains all my publicly declared variables, including the multidimensional array. The code for that is:
Module 2 - Here I ReDim the array as a 2 dimensional array and add the values to it.
At this point, when I Watch the tableArray variable, it displays correctly, with data populated in each of the collections (although some are left blank intentionally)
After this I have a final module - where the problem is. The Sub in this module is run after the user double clicks on certain cells within a worksheet (but this will always happen after the Sub in the second module has run):
I get the error on double clicking: "Subscript out of range", and the watch now reports the tableArray as type Collection(0 to -1), with no data. Why, if this is a public variable, is the data not being retained properly?
Thanks in advance!
Sprucie
Bookmarks