title: Unhandled exception of type 'System.IO.IOException' occurred in mscorlib.dll
body: <p>I'm having trouble with this block of code. The StreamWriter creates the .txt document and puts it in the projects bin folder, but when I run the program, I get an error that says:</p>
  
  <p><strong>An unhandled exception of type 'System.IO.IOException' occurred in mscorlib.dll</strong><br>
  the process cannot access the file ... because it is being used by another process.</p>
  
  <p>There are no other programs running on my computer, so I'm not sure what other process could be using it. Here's my code, thanks in advance.</p>
  
  <pre><code>Private Sub saveButton_Click(sender As Object, e As EventArgs) Handles saveButton.Click
      Dim voteWriter As IO.StreamWriter
      Dim vote As String
  
      voteWriter = IO.File.AppendText("warrenHS.txt")
      vote = Convert.ToString(canidateListBox.SelectedItem)
  
      voteWriter.Write(vote)
  End Sub
  </code></pre>