we have a xlsm file that processes some data and finally saves the file as xlsx in a different folder.
earlier the save prompt when saving as non-macro workbook would have 3 options: "yes", "no" and "help" with yes as default meaning we save and discard code, but now the prompt is having 4 options with "back" as the default and hence the vba code fails
?so how do we get the old prompt version back?
?Or alternatively, can the default choice in the new prompt be "save and discard functions"?
(sorry I only have the danish version of that prompt so my translation may not be exact)
?Do any of you know where this new prompt comes from - is it in the Application.Dialogs collection and if so what is it called?
and please I'm not talking about the first prompt, but the second - after pressing save where it says that
"the following features cannot be saved in macro-free workbooks" (see images below)
this is the one that changed from 3 to 4 buttons with "back" as default option
The code has been working for years, but now - for some users - Excel shows a different prompt when trying to save as macrofree workbook. therefore setting Application.DisplayAlerts = False is not working as it chooses the default option, which in case of the new prompt is to go back, and then an error occurs in the code
on computers with this prompt the VBA code works since "yes" is the default choice:
on computers with this prompt the VBA code fails since "Gå tilbage" (= "Go back") is the default choice:
example code for the save part that fails:
Sub saveas()
Dim fil As String, path As String
Dim wb As Workbook
Dim Nyfil As String
Set wb = ThisWorkbook
fil = wb.Name
path = wb.path
Nyfil = Replace(fil, ".xlsm", ".xlsx", , , vbTextCompare)
wb.Save
Application.DisplayAlerts = False
wb.saveas Filename:=path & "\" & Nyfil, FileFormat:=xlOpenXMLWorkbook
Application.DisplayAlerts = True
End Sub


The following will work only if you don't have code in the worksheets modules, but maybe it helps you or someone else. The code will copy all sheets into a new workbook and save that new workbook. However, copying worksheets will copy also the code within the sheets, so if a sheet holds code, you will face the same problem again.
If your workbook contains hidden sheets and you want to copy them also, you temporarily have to make them visible, else they will not be copied.