So im trying to do a simple system in my VB Express Edition 2008 and what it does is add some car models (example) to a list box and stores it in a .txt file for future use. But when the user clicks a delete button it should delete from both the listbox and the .txt. Any Ideas?

I have to use only the FileOpen(OpenMode.Append or OpenMode.Input/Output) functions. Please Help! Thanks

Try this code,

 If ListBox1.SelectedIndex <> -1 Then
            System.IO.File.WriteAllLines("file.txt", ListBox1.Items.Cast(Of String)().ToArray())
 End If