---
title: "Split"
type: "forum-thread"
url: "https://www.webforum.nu/amne/dotnet/45844-split"
topic: ".NET"
topic_url: "https://www.webforum.nu/amne/dotnet"
author: "roj"
published: "2002-06-13T14:38:21.000Z"
updated: "2002-06-13T20:13:51.000Z"
replies: 3
views: 222
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/45844-split"
---

# Split

## #1 — roj, 2002-06-13T14:38Z

Hmm hur splitar man en array i vb..
typ jag har en string med a,b,c,d,e,f
och vill pocka ut bokstav för bokstav

typ

```
Dim stri As String
stri = Text1.Text
Split stri, ","
MsgBox stri(1)
```

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

## #2 — @nders, 2002-06-13T14:39Z

```
myArray = split(stri, ",")
msgbox(myArray(0))
```

Typ.

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

## #3 — roj, 2002-06-13T14:54Z

Om jag nu vill göra en lopp på detta som e likla lång som arrayn

typ 

```
for i =0 to myarray.length step 1
msgbox (i)
next i
```

Hur fixar jag det då?

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

## #4 — Broskan, 2002-06-13T20:13Z

UBound

Här har du lite att testa på.

Private Sub Command1_Click()

Dim stri As String

stri = Text1.Text 
arrText = Split(stri, ",")

For i = 0 To UBound(arrText) Step 1
MsgBox arrText(i)
Next i

End Sub

//Broskan

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

---

Tråden på webben: https://www.webforum.nu/amne/dotnet/45844-split
