Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27243

Multiple Textboxes to one textfile

$
0
0
Hey Guys,

at first, sorry for this noob question but im pretty new in VB^^
So basically, i have a programm with two listboxes and i want that i can save the content of the listboxes to a txt file
(It should be like this:
Listbox1.Item1 + Listbox2.Item1
Listbox1.Item2 + Listbox2.Item2 etc)

Im currently at this point:
Code:

Dim sw As New System.IO.StreamWriter(SaveFileDialog1.FileName)
        Dim i As Integer
        For i = 0 To ListBox1.Items.Count - 1
            sw.WriteLine(ListBox1.Items.Item(i))
        Next
        sw.Close()

I already tried different possibilities but never got it working :(
Would be cool if you guys can help me with this

Thanks in advance and sry for being a noob

Viewing all articles
Browse latest Browse all 27243

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>