---
title: "If then end sub"
type: "forum-thread"
url: "https://www.webforum.nu/amne/dotnet/97706-if-then-end-sub"
topic: ".NET"
topic_url: "https://www.webforum.nu/amne/dotnet"
author: "firstchoice"
published: "2004-02-19T11:05:06.000Z"
updated: "2004-02-19T11:06:09.000Z"
replies: 1
views: 226
page: 1
pages: 1
language: "sv-SE"
site: "webForum — webforum.nu"
rights: "Upphovsrätten till varje inlägg tillhör dess författare."
attribution: "Citera som: webForum, https://www.webforum.nu/amne/dotnet/97706-if-then-end-sub"
---

# If then end sub

## #1 — firstchoice, 2004-02-19T11:05Z

jag vill om if satsen går in att programmet skall hoppa ur Suben
hur gör jag det? följande fungerade inte :(

```
    If Not IsNumeric(txtTal1) And Not IsNumeric(txtTal2) Then
        MsgBox ("Du kan endast skriva tal!")
        End Sub
    End If
```

Permalänk: https://www.webforum.nu/p/97706

## #2 — @nders, 2004-02-19T11:06Z

```
Exit sub
```

Permalänk: https://www.webforum.nu/p/1279943

---

Tråden på webben: https://www.webforum.nu/amne/dotnet/97706-if-then-end-sub
