Hello I am trying to save a listbox as a txt file.
Language: visual basic .net
i used the code below, and it actually saved the file, but the contents that where in the listbox were not saved with the file. if someone could modify my code below, or even better, make a small example , i would greatly appriciate it!
code i used:
SaveFileDialog1.Filter = "Text Documents (*.txt)|*.txt|All Files|*.*"
SaveFileDialog1.ShowDialog()
If SaveFileDialog1.FileName <> "" Then
FileOpen(1, SaveFileDialog1.FileName, OpenMode.Output)
PrintLine(1, listbox1.Text.Length)
FileClose(1)
End If
thank you
Language: visual basic .net
i used the code below, and it actually saved the file, but the contents that where in the listbox were not saved with the file. if someone could modify my code below, or even better, make a small example , i would greatly appriciate it!
code i used:
SaveFileDialog1.Filter = "Text Documents (*.txt)|*.txt|All Files|*.*"
SaveFileDialog1.ShowDialog()
If SaveFileDialog1.FileName <> "" Then
FileOpen(1, SaveFileDialog1.FileName, OpenMode.Output)
PrintLine(1, listbox1.Text.Length)
FileClose(1)
End If
thank you