Expected procedure, not user-defined type

There is no procedure by this name in the current scope, but there is a user-defined type by this name. You can call a procedure, but not a user-defined type. This error has the following cause and solution:

  • The name of a user-defined type is used as a procedure call. Check the spelling of the procedure name, and make sure the procedure you are trying to call isn't private to another module.

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.