9

The current active workbook is a macro-enabled one.

After performing some automated data manipulation, I want to save it as a new macro-free workbook (thus .xlsx instead of .xlsm). To do this, I recorded and edited a macro:

Dim newFilePath As string
newFileFullName = "C:\List.xlsx"

ActiveWorkbook.SaveAs Filename:=newFileFullName, FileFormat _
:=xlOpenXMLWorkbook, CreateBackup:=False

Workbooks.Open Filename:=newFileFullName
Windows("List.xlsx").Activate

However, whenever I run this macro, a window keeps popping up, asking for confirmation that I want to change the file format.

How can I suppress this pop-up and default it to "Yes"?

Mierzen
  • 566
  • 1
  • 5
  • 25

1 Answers1

15

Add Application.DisplayAlerts = False

Thanks @simoco

Mierzen
  • 566
  • 1
  • 5
  • 25
  • 3
    The problem is that the answer was posted as a comment, so there's no answer to accept. If @simoco comes back and post this as an answer, then this answer should be deleted, otherwise this need to stay here and be self-accepted after two days. – Adi Inbar Apr 20 '14 at 01:47