Line isn't an executable statement

Declarations and comments are not executable statements. This error has the following cause and solution:

  • You chose the Step To Cursor command, but the cursor was not on a line containing an executable statement. Place the cursor on an executable statement near the current line.

For additional information, choose the Step To Cursor command on the Run menu 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.