Hi, like title says, I want to save the listbox contents in to xyz.txt
How can i do this in VB? I want it to save automaticaly into C:\xyz.txt
BR and thnx for your help.
Printable View
Hi, like title says, I want to save the listbox contents in to xyz.txt
How can i do this in VB? I want it to save automaticaly into C:\xyz.txt
BR and thnx for your help.
Try:
Code:Dim Writer As New System.IO.StreamWriter("C:\xyz.txt")
For i = 0 To ListBox1.Items.Count - 1
Writer.WriteLine(ListBox1.Items.Item(i))
Next i
Writer.Close()