title: Vba open files without extension from folder and save as different format
body: <p>I am trying write a macro to get every file in a folder to open and then save as an xlsx file. The files I am working with don't have a file extension, the data is tab delimited and opens fine manually. I have this code to open every file in a folder, however I haven't been able to get it to open files without a file extension. </p>
  
  <pre><code>Sub Open_All_Files()
  Dim oWbk As Workbook
  Dim sFil As String
  Dim sPath As String
  
  sPath = "E:\Macro" 'location of files
  ChDir sPath
  sFil = Dir("*.xlsx") 'change or add formats
  Do While sFil &lt;&gt; "" 
  Set oWbk = Workbooks.Open(sPath &amp; "\" &amp; sFil) 'opens the file
  
  'Code to save as different file extension would go here
  
  oWbk.Close True 'close the workbook, saving changes
  sFil = Dir
  Loop ' End of LOOP
  End Sub
  </code></pre>
  
  <p>I also don't know how to get each file to save as an xlsx file. </p>
  
  <p>I'm completely new to vba so any help would be greatly appreciated.
  Thanks </p>