I have simple class modules that act as custom objects in my VBA project. The properties are simple variable types or equate to simple variable types (string/long/boolean etc) though some properties are other classes of simple variables. When one of the code threads in my project has finished executing and these objects are filled with info, I want to be able to save these objects for use (in the same workbook) at some point later by a different code thread.
It seems that Document.Properties is a good place to keep data for this reason, but it only accepts simple variable types. In javascript, I'd just JSON.stringify("the object") and I'd be good to go, but of course VBA doesn't play nicely with JSON.
Basically, I'm either looking for a way to turn my object into a string to store in Document.Properties or I'm looking for a different way to store an object that perhaps I haven't came across. Unless there's some way I can use the scope of the object to keep the object alive, until the document is closed say?