title: Using "Application.DisplayAlerts = False gives "Method or Data Member not found" compile error
body: <p>I have a module in Access to format cells in an Excel spreadsheet.</p>
  
  <pre><code>Sub FormatData()
  
  Workbooks.Open FileName:="C:\Users\john.doe\Documents\scripts\apps\allow\Weekly_Cash_Trending"
  
  Workbooks("Weekly_Cash_Trending.xlsx").Activate
  
  
  Columns("C:C").Select
  Selection.NumberFormat = "$#,##0"
  Range("A1").Select
  
  ActiveWorkbook.SaveAs FileName:="C:\Users\john.doe\Documents\scripts\apps\allow\Weekly_Cash_Trending"
  End Sub
  </code></pre>
  
  <p>It works, but it gives a pop up to confirm saving the file.</p>
  
  <p><a href="https://i.stack.imgur.com/nfQOs.png" rel="nofollow noreferrer">Excel message</a></p>
  
  <p>When I change the code to use "Application.DisplayAlerts"</p>
  
  <pre><code>Sub FormatData()
  
  Application.DisplayAlerts = False
  Workbooks.Open FileName:="C:\Users\john.doe\Documents\scripts\apps\allow\Weekly_Cash_Trending"
  
  Workbooks("Weekly_Cash_Trending.xlsx").Activate
  
  
  Columns("C:C").Select
  Selection.NumberFormat = "$#,##0"
  Range("A1").Select
  
  ActiveWorkbook.SaveAs FileName:="C:\Users\john.doe\Documents\scripts\apps\allow\Weekly_Cash_Trending"
  Application.DisplayAlerts = True
  End Sub
  </code></pre>
  
  <p>I get the following error: Method or Data Member not found</p>
  
  <p><a href="https://i.stack.imgur.com/Sq8d2.png" rel="nofollow noreferrer">Method or Data Member not found Error</a></p>
  
  <p>I am new to VBA coding (obviously), can anyone help me resolve this? Thanks!</p>