Forum Discussion
LemonPeeler
Aug 25, 2022Copper Contributor
How do we exit a CASE SELECT block?
How do we exit an Excel SELECT CASE block? We have found a Microsoft Docs indicating that you can only use the EXIT SELECT command if it is between the SELECT (or SELECT CASE) and the matching END SE...
JoeUser2004
Aug 25, 2022Bronze Contributor
Once again, you are asking a syntax question without showing us the complete context in one form or another.
According to Excel VBA help, there is no Exit Select statement. Use a GoTo instead.
I think you are looking at documentation for .NET Visual Basic. That is a stand-alone compiler. Technically, it is a different language with different features and possibly different behaviors.
Admittedly, I have fallen into the same trap myself, because the two languages are "similar enough" perhaps 90% of the time.
LemonPeeler
Aug 25, 2022Copper Contributor
Thank you for the response. As a novice, we probably missed that the article didn't apply to Excel VBA. Furthermore, we solved this problem in the end when we solved the issue of using the GOTO statement, which was not functioning for us due to another error, which was also resolved. Thank you again!