In VBA, I know that if you want subs/functions to be accessible only within the current Project, you can put those methods into a module marked Option Private Module.
But what if I want to do this with a certain method within a Class Module? Can I separate out a single method from a Class?
Specifically, I have a Property in one of my Classes that I want to be Read-Only unless it is being used within the current Project. There are other Properties/Subs/Functions within that Class that I want to be truly Public.
I thought Friend Property Let... might be the correct way to do this, but when I try it, it doesn't stop another Project in the same open Excel session from assigning to the property.
So I am looking for the equivalent of Option Private Module for a subset of functions within a Class.
Is this possible?
Another way of approaching this question would be: Can you spread a Class Module over multiple sub-modules?