Urk. I had a VBA class that didn't have an interface and didn't need a factory. Now I'm considering adding an interface & factory but that would impact the existing calling code....
nah. had some more thinking and will add a 2nd instance that acts as factory/collection, so the original code won't have to change but new code can use the new factory going fwd
---------------------------
Microsoft Visual Basic for Applications
---------------------------
Compile error:
Circular dependencies between modules
---------------------------
OK Help
---------------------------
@IvenBach most likely, the interface was extracted from the class, and one of the members is an enum type and the enum is defined in the class module. When the class starts implementing the extracted interface, ..circular dependency - and now you know why I always define the enums in the interface class =)
At first it felt wrong. Like defining an Enum type in a worksheets code behind. However after thinking about it for a bit defining it on the interface isn't an issue. That's because the interface Enum definition can't get duplicated, unlike a worksheets Enum can.
Oh... This wasn't from a refactoring command. This is all Iven manually doing it.
@IvenBach not only that - the class/es implementing that interface is/are going to need to respect the types involved in the interface members; if an interface needs to return an enum type defined by user code, then whatever module defines that enum is forever forbidden to ever interact with that interface!
that generally leaves two places: some Constants standard module, or the interface that uses the enum