Expected variable or procedure, not module

There is no variable or procedure by this name in the current scope, but there is a module by this name. This error has the following cause and solution:

  • The name of a module is used as a variable or procedure. Check the spelling of the variable or procedure name, and make sure the name you want to refer to isn't private to another module. A module name can be a qualifier, but can't stand alone.

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.