Dim dialog As New SaveFileDialog
dialog.Filter = "Text files (*.txt)|*.txt"
dialog.FilterIndex = 2
If dialog.ShowDialog() = DialogResult.OK Then
Dim output As New IO.StreamWriter(dialog.FileName)
For Each item As Object In ListBox1.Items
output.WriteLine(ListBox1.GetItemText(item))
Next item
output.Close()
End If
No comments:
Post a Comment