End Select without Select Case

End Select must be matched with a preceding Select Case. This error has the following cause and solution:

  • You used an End Select statement without a corresponding Select Case statement. This is usually due to an extra End Select below a Select Case block, or leaving behind the End Select statement when copying a Select Case block from oneprocedure to another. Check each End Select statement to make sure it terminates a Select Case structure.

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.