split function help?

how are you trying to use it?
here's a couple of ways.
Visual Basic:
Dim s() As String = "some text with spaces".Split(" ") '/// fill the s() array with the words that are Split by the spaces.
Dim x As Integer
For x = LBound(s) To UBound(s)
    MessageBox.Show(s(x))
Next

or ...
Visual Basic:
Dim StrString As String = "some text with spaces"
Dim s() As String = Split( StrString , " ")
Dim x As Integer
For x = LBound(s) To UBound(s)
    MessageBox.Show(s(x))
Next
both ways will work fine.
 
This is a sample of questionaire:
Text left of : is checkbox label
Text to right of : goes to an output file if box is checked


another’s house : at another’s house
bar/club : in a bar or club
concert : at a concert
construction site : at a construction site
day care : in day care
home : at home
nursing home : in the resident’s nursing home
outdoors : in an outdoor venue
party : at a party
public place : in a public place
restaurant : in a restaurant
school : at school
store : in a store
work : at work

tried this
--------------------------------------------------------------------------------
For i = 1 To noverbs
verb(i) = ListBox1.Items(i)
parts = verb(i).Split(":")
verbl(i) = parts(0)
verbr(i) = parts(1)
Next i
parts(0) gives text left of : parts(1) gives error
--------------------------------------------------------------------------------
 
Back
Top