If System.IO.File.Exists(dbToUse.Text) = True Then
Dim textStreamReader As IO.StreamReader = System.IO.File.OpenText(dbToUse.Text)
Dim currentLine As String = ""
Dim theArray As New Collection
Do While Not currentLine Is Nothing
currentLine = textStreamReader.ReadLine
theArray.Add(currentLine)
Loop
textStreamReader.Close()
theArray.Remove(dataBox.SelectedIndex + 1)
Try
FileOpen(1, dbToUse.Text, OpenMode.Output, OpenAccess.Write)
For Each currentLine In theArray
PrintLine(1, currentLine)
Next currentLine
FileClose(1)
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Critical, "Error")
End Try
loadDB()
End If