title: Opening a TAB delimited CSV and Saving as TAB Delimited
body: <p>So, I have CSV file that is Tab Delimited.
  I have a macro that changes the content of the file and then saves it using the code:</p>
  
  <pre><code>wb.Close SaveChanges:=True
  </code></pre>
  
  <p>The problem is, it is then saved as a CSV Comma Separated.</p>
  
  <p>When another routine open the file, it gets messed up.</p>
  
  <p>I looked around, and I did not found a way to save the file as a TAB delimited CSV in Excel. </p>
  
  <p>Can someone help me? Below is the full code:</p>
  
  <pre><code>    Sub routine()
  
  
  Dim wb As Workbook
  Dim Path As String 'Caminho
  Dim File As String 'Arquivo da pasta
  Dim Folder As FileDialog 'Pasta de origem
  Dim answer As Integer
  
  '-------------------------------------------------------------------------------'
  
  
  
  
  answer = MsgBox("This macro will ask you to select a folder and change all the files from that folder. This action is not reversible, so make a backup before proceeding.", vbYesNo + vbInformation, "Confirm Action")
  
  If answer = vbYes Then
  
      Set Folder = Application.FileDialog(msoFileDialogFolderPicker)
  
      With Folder
      .Title = "Select Folder with CSV Files"
      .AllowMultiSelect = False
          If .Show &lt;&gt; -1 Then GoTo NextCode
          Path = .SelectedItems(1) &amp; "\"
      End With
  
      'Caso o usuário cancele
  NextCode:
      Path = Path
      If Path = "" Then GoTo Resetar
      File = Dir(Path &amp; "*.csv*")
  
  
  
      Do While File &lt;&gt; ""
      Set wb = Workbooks.Open(Filename:=Path &amp; File)
  
  
      Columns("A:A").Select
          Selection.TextToColumns Destination:=Range("A1"), DataType:=xlDelimited, _
          TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=True, _
          Semicolon:=False, Comma:=False, Space:=False, Other:=False, TrailingMinusNumbers:= _
          True
  
  
      Range("N:N, M:M, L:L, K:K, J:J, H:H, G:G, F:F, D:D, C:C ").EntireColumn.Delete
      Range("A2").EntireRow.Delete
      wb.sav
      wb.Close SaveChanges:=True
  
  
  
      DoEvents
      File = Dir
      Loop
  
  
      MsgBox "CSV Files From Folder Updated"
  
  
  Else
      GoTo Resetar
  
  
  Resetar:
  MsgBox "User Cancelled Action"
  
  End If
  
  End Sub
  </code></pre>