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 page is specific to the Visual Basic for Applications (VBA) Language Reference for Office 2010.

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.