title: How to convert from xlsm to xlsx keeping the same name
body: <p>how can I change the format from <code>xlsm</code> to <code>xlsx</code>. I need a script that will save a copy of the <code>xlsm</code> file with  <code>xlsx</code> extension,  but doesn't ask user to input file name, it needs to keep the original name, the only thing the user needs to do is select where to save the file. </p>
  
  <pre><code>Sub changeext()
  
  Dim s_as As String
  
  s_as = ThisWorkbook.FullName
  
  s_as = Left(s_as, InStrRev(s_as, ".") - 1) &amp; ".xlsx"
  
  ThisWorkbook.SaveAs FileName:=s_as
  
  Application.DisplayAlerts = False
  
  End Sub
  </code></pre>