Hmm, I'm not sure a "public array" does what you hope it might.
I did throw together a simple demo showing how to share a Dictionary (without any locking logic, just the simplest example possible). See
Sharing Objects via an ActiveX EXE.
That might or might not do what you need.
Ideally you'd wrap the Dictionary providing your own interface that incorporates locking and probably an optional "change" event to signal all clients about any updates (add, change, delete).
You'd probably also want to persist the data to disk but that's fairly easy to do in the Connector Class's Initialize and Terminate event handlers.
And for that matter the ActiveX EXE could host multiple shared Dictionaries, or even a shared Collection of Dictionary objects. Collections can be superior because it is easy to create a custom collection Class and very clumsy to create a custom "dictionary" style Class.
The main thing I dislike about this approach is that the Dictionary has those nasty, expensive Keys and Items methods. The
only way to "see" a Key requires retrieving the Keys array. These copy the entire Dictionary content into arrays, and can be expensive to marshal across processes. Not so awful as to be unusable within one machine, though I'm not sure I'd want to do it across even a fast LAN.
VBA.Collection and Scripting.Dictionary each offer different strengths and weaknesses, so the choice requires some thought.