Breakpoint not allowed on this line

Breakpoints can only be placed on certain parts of statements. This error has the following causes:

  • You tried to place a breakpoint on a line that can't accept a breakpoint, for example:

    • A line that contains only comments.

    • A line that contains only line labels.

    • A line that contains only declarations (Const, Dim, Static, Type, and so on).

    • Any line in a hidden module.

    • Any line in the Immediate window.

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.