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"?
All you have to do is drag and drop the XLSM file, select the desired format, and click on convert. When you are done converting the file, you can download the XLSX file. The files you are converting will be stored in Cloud.
Saving the Workbook as XLSX file This is the easiest way to remove macros from an Excel workbook! XLS, XLSM, and XLSB are the only Excel file formats that can hold VBA projects or Macros. If you save an Excel workbook as an XLSX file, the Macros in that workbook will be removed.
In the Save As box, in the Save as type list box, choose Excel Macro-Enabled Workbook (*. xlsm). Click Save.
Add Application.DisplayAlerts = False
Thanks @simoco
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With