Advertisement
alien_fx_fiend

VB.NET-How to Save A List of Items in A ListBox To A TextFil

Jul 25th, 2019
362
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VB.NET 0.51 KB | None | 0 0
  1. Public Class Form1
  2.     Dim W As IO.StreamWriter
  3.  
  4. Private Sub addItem_Click(ByVal sender As System.Object, ByVal e As Args)
  5.     lb1.Items.Add(tb1.Text)
  6.     lb1.SelectedIndex = lb1.SelectedIndex + 1
  7. End Sub
  8. Private Sub sItems_Click(ByVal sender As System.Object, ByVal e As Args)
  9.     Dim i As Integer
  10.     W = New IO.StreamWriter("C:\" & sName.Text & ".txt")
  11.     For i = 0 To lb1.Items.Count - 1
  12.  
  13.     Next
  14. End Sub
  15. End Class
  16. //https://www.dailymotion.com/video/x30q25g listbox, textinputbox, additem, saveitems, textinputbox{filename}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement