title: How to save as xlsx file?
body: <p>My SaveFile sub saves the file but when I try to open it again Excel doesn't recognize it as an Excel file.</p>
  
  <p>If I right click the file from my desktop and check the properties, the type of file is "File". I've read up on the formatting but can't get this file to save as an xlsx format. I was able to get a macro-enabled excel file to work properly but that's not what I want.</p>
  
  <pre><code>Sub SaveFile()
  
      MsgBox ("You will now be prompted to save your file") 'Notifies User 
      savename = Application.GetSaveAsFilename()  'Gets directory/name
      ActiveWorkbook.SaveAs Filename:=savename, FileFormat:=51 'Something is wrong 
  
  End Sub
  </code></pre>
  
  <p>Here is the picture of the "Formatless" file<br>
  <a href="https://i.stack.imgur.com/8xv11.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/8xv11.jpg" alt="enter image description here"></a></p>