title: use vba to automate multiple xml to excel
body: <p>alright, to start of: i am a complete VBA nitwit. I've been trying to crack this code for some hours now, and I think the best way to get further ánd learn how vba works, is calling in the troops. I hope no-one is offended by this.</p>
  
  <p>This is what I am trying to do:
  a) open all xml files in a folder, one by one
  b) convert them to an excel file
  c) then save them one by one as an excel file in another folder</p>
  
  <p>the code I have so far is below:</p>
  
  <pre><code>Sub xmltoxl()
  Dim fs As FileSearch
  Dim i As Integer
  Dim wbk As Workbook
  Dim s As Integer
  
  Set fs = Application.FileSearch
  
  With fs
      .LookIn = ThisWorkbook.Path
      .Filename = "*.xml"
      For i = 1 To .Execute()
          Set wbk = Workbooks.OpenXML(.FoundFiles(i))
          s = 1
     ChDir "C:\Users\Seeb\Desktop\Volkskrant\2013_archiefb"
      ActiveWorkbook.SaveAs Filename: (s &amp; ".xls")
      s = s + 1
      Next i
  End With
  
  End Sub
  </code></pre>