Invalid procedure name

There are restrictions in procedure-naming beyond the rules for naming identifiers. This error has the following cause and solution:

  • procedure host application

    Choose another name for the procedure.

  • Your procedure name is that of a restricted keyword, exceeds 255 characters, or doesn't begin with a letter. Choose a different name for the procedure.

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.