Private object modules cannot be used in public object modules as parameters or return types for public procedures, as public data members, or as fields of public user defined types
This error has the following cause and solution:
- You attempted to use a private object module as a parameter in a public object module, or as a return type for a public procedure, data member, or as a field of a public user defined type, which is not allowed.
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.