Had a nice read about DI here in VBA:
https://rubberduckvba.wordpress.com/2016/07/05/oop-vba-pt-2-factories-and-cheap-hotels/
So now the next step would be use an IoC container in VBA. But I am wondering if that's even possible! I'm new to VBA and I cant figure out a few things:
- If done in VBA, VBA has no namespaces or Type equivalent from C#. So how would my lookup table store a unique key for a type?
- I thought about writing a com dll in C# and implement an IoC there but I cant figure out how to pass on a Interface type to the com interface. I cant even instantiate an interface to pass it as an object to com.
Am I reduced to just using strings and implement namespaces in VBA using modules?
PS: I did not find any exisiting implementation of IoC container for vba, so if there's any, I'm all ears!