title: Batch convert Excel to text-delimited files
body: <p>Hi I'm facing a problem on dealing with converting Excel spreadsheets to txt files.</p>
  
  <p>What I want to do is to create a Macro which can takes all the xls files in one folder and convert them to txt files.</p>
  
  <p>The code currently working on </p>
  
  <pre><code>Sub Combined()
  
    Application.DisplayAlerts = False
  
    Const fPath As String = "C:\Users\A9993846\Desktop\"
    Dim sh As Worksheet
    Dim sName As String
    Dim inputString As String
  
    With Application
      .Calculation = xlCalculationManual
      .EnableEvents = False
      .ScreenUpdating = False
    End With
  
    sName = Dir(fPath &amp; "*.xls*")
  
    Do Until sName = ""
      With GetObject(fPath &amp; sName)
        For Each sh In .Worksheets
          With sh
            .SaveAs Replace(sName, ".xls*", ".txt"), 42 'UPDATE:
          End With
        Next sh
        .Close True
      End With
      sName = Dir
    Loop
  
    With Application
      .Calculation = xlAutomatic
      .EnableEvents = True
      .ScreenUpdating = True
    End With
  End Sub
  </code></pre>
  
  <p>But It's not working as expected, I have 0 knowledge on VB. Anyone willing to give a hand?</p>