Code:
For i = 0 To ListBox4.Items.Count() - 1
If ListBox4.SelectedIndex = i Then
ListBox4.SelectedIndex = i + 1
Else
ListBox4.SelectedIndex = 0
End If
wrf.WriteLine(ListBox4.SelectedItem)
Next
Ive tried alot to solve this problem, probably me being really tired.
What it does is write all the items in a listbox, i thought of a few different ways and i guess this way would be the best. selecting every index and writing its value.
i guessed wrong.
fix please?
came up with this...
Code:
oWrite = oFile.CreateText(SaveFileDialog1.FileName)
Dim i As Integer, s As String
For i = 0 To ListBox4.Items.Count - 1
s = ListBox4.Items.Item(i)
oWrite.WriteLine(s)
Next i
oWrite.Close()
It works. Fixed it myself.


