title: Suppress dialog when using VBA to save a macro containing Excel file (.xlsm) as a non macro containing file (.xlsx)
body: <p>How do I suppress the dialog that says &quot;Visual Basic macros will be removed if you save the file in this format.  Are you sure you want to use this format?&quot; (see picture below).</p>
  <p>Essentially, I'm trying to use a macro to save a .xlsm file as an .xslx file?. I've tried all the dialog suppression code I can find and it isn't working.</p>
  <p>Here's my code:</p>
  <pre><code>Private Sub SaveWithNoMacros()
      Application.ScreenUpdating = False
      Application.DisplayAlerts = False
      Application.EnableEvents = False
      ActiveWorkbook.SaveAs Filename:=&quot;Clean Workbook With No Macros.xlsx&quot;, _  
         FileFormat:=xlOpenXMLWorkbook, CreateBackup:=False
      Application.EnableEvents = True
      Application.DisplayAlerts = True
      Application.ScreenUpdating = True
   End Sub
  </code></pre>
  <p>Here's the dialog:</p>
  <p><img src="https://i.stack.imgur.com/Tq17l.png" alt="Excel Dialog" /></p>
  
  <p>As you might imagine, I need to convert a lot of workbooks and would prefer not to do this manually.</p>
  <p>-D.</p>