Option Private Module not permitted in object module
Option Private Module makes the contents of a module unavailable to other projects, while preserving their availability to your project. This error has the following cause and solution:
The statement Option Private Module appears in an object module.
Remove the Option Private Module statement from the module. Object modules have the characteristic of Option Private Module by default. Changing the default can't be done from code. See your host application's documentation for information on giving object module members wider visibility.
For additional information, select the item in question and press F1 (in Windows) or HELP (on the Macintosh).
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.