The end of a SELECT CASE statement appears without a beginning SELECT CASE. The beginning of the SELECT CASE statement may be missing or misspelled. Also check other control structures within the SELECT...END SELECT structure and verify that they are correctly matched. For example, an IF block without a matching END IF inside the SELECT...END SELECT structure generates this error.