title: Excel VBA puts extra blank line at end of text file when exporting
body: <p>I have an Excel VBA macro that outputs to a text file. There is always a blank row at the bottom of the text file and I am having trouble getting rid of it. Any useful suggestions would be greatly appreciated! Thanks</p>
  
  <pre><code>Sub testExport()
  
    Dim fPath As String, exportTxt As String
    fPath = CreateObject("WScript.Shell").SpecialFolders("Desktop") &amp; "\Sample_" &amp; Format(Now(), "HHNNSS") &amp; ".txt"
  
    exportTxt = "Project: Sample Output" &amp; vbCrLf
    exportTxt = exportTxt &amp; "Model Version: 1 "
  
  
    Open fPath For Append As #1    'write the new file
    Print #1, exportTxt
    Close #1
  </code></pre>
  
  <p>End Sub</p>