title: Excel crashing when using ThisWorkbook.Save to avoid the message "click yes to save macro-free work book"
body: <p>I'm trying to hide alerts to avoid the message saying "click yes to save macro-free work book etc.", but Excel crashes.  </p>
  
  <pre><code>Application.DisplayAlerts = False
  Dim v As Variant
  v = Application.GetSaveAsFilename(, "Excel files (*.xlsx), *.xlsx")
  
  If VarType(v) = vbString Then
      ActiveWorkbook.SaveAs Filename:=v, _
      FileFormat:=51, CreateBackup:=False
  End If
  
  ThisWorkbook.Save
  Application.DisplayAlerts = True
  Application.Quit  
  </code></pre>
  
  <p>After the user chooses the destination and name of the file to save, the workbook should close. To avoid the message that confirms saving I used ThisWorkbook.Save.</p>
  
  <p><strong>EDIT</strong>  </p>
  
  <p>I fixed it by using</p>
  
  <pre><code>ThisWorkbook.Saved = True  
  Application.Quit  
  Application.ActiveWindow.Close SaveChanges:=False   
  ActiveWorkbook.Close SaveChanges:=False`
  </code></pre>
  
  <p>instead of</p>
  
  <pre><code>ThisWorkbook.Save  
  Application.Quit
  </code></pre>