# Select Case with Case IsA

**URL:** <https://forum.xojo.com/t/select-case-with-case-isa/74393>\
**Category:** Bugs and Feature Requests\
**Created:** [February 6, 2023, 9:50pm UTC](https://forum.xojo.com/t/select-case-with-case-isa/74393 "2023-02-06T21:50:46Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Antoine\_Beaubien](https://forum.xojo.com/user_avatar/forum.xojo.com/antoine_beaubien/32/12603_2.png) [@Antoine\_Beaubien](https://forum.xojo.com/u/Antoine_Beaubien)\
**Post date:** [February 6, 2023, 9:50pm UTC](https://forum.xojo.com/t/select-case-with-case-isa/74393/1 "2023-02-06T21:50:46Z")

</div>

Feedback Case Number:

I’m trying to do a SELECT CASE with a CASE ISA, but it doesn’t compile…

This code is put into an Opening Event Handler… (All my other tests failed also).

```auto
Select Case Me
Case IsA DesktopWindow
  Beep
  
Else
  MessageBox("Oups")
End Case

```

Am I missing something?

Regards,  
Antoine

---

<div class="post-metadata">

**Author:** ![Paul\_Lefebvre](https://forum.xojo.com/user_avatar/forum.xojo.com/paul_lefebvre/32/3152_2.png) [@Paul\_Lefebvre](https://forum.xojo.com/u/Paul_Lefebvre)\
**Post date:** [February 6, 2023, 10:02pm UTC](https://forum.xojo.com/t/select-case-with-case-isa/74393/2 "2023-02-06T22:02:06Z")

</div>

I think you want “End Select”, not “End Case” there at the end.

---

<div class="post-metadata">

**Author:** ![AlbertoD](https://forum.xojo.com/letter_avatar_proxy/v4/letter/a/dbc845/32.png) [@AlbertoD](https://forum.xojo.com/u/AlbertoD)\
**Post date:** [February 6, 2023, 10:02pm UTC](https://forum.xojo.com/t/select-case-with-case-isa/74393/3 "2023-02-06T22:02:56Z")

</div>

> [@Antoine\_Beaubien](#):
>
> but it doesn’t compile

What error do you get?

---

<div class="post-metadata">

**Author:** ![Antoine\_Beaubien](https://forum.xojo.com/user_avatar/forum.xojo.com/antoine_beaubien/32/12603_2.png) [@Antoine\_Beaubien](https://forum.xojo.com/u/Antoine_Beaubien)\
**Post date:** [February 6, 2023, 10:05pm UTC](https://forum.xojo.com/t/select-case-with-case-isa/74393/4 "2023-02-06T22:05:16Z")

</div>

A really stupid mistake. Thanks.

---

<div class="post-metadata">

**Author:** ![Emile\_Schwarz](https://forum.xojo.com/letter_avatar_proxy/v4/letter/e/90ced4/32.png) [@Emile\_Schwarz](https://forum.xojo.com/u/Emile_Schwarz)\
**Post date:** [February 7, 2023, 9:11am UTC](https://forum.xojo.com/t/select-case-with-case-isa/74393/5 "2023-02-07T09:11:38Z")

</div>

That is End Case in C (and VB)… and…
