VB projects and XLM sheets cannot be saved in a macro-free workbook

Jeffrey Mahoney

Well-known Member
Joined
May 31, 2015
Messages
3,142
Office Version
  1. 365
Platform
  1. Windows
I've had this macro running for a couple years with no issue. It basically creates a copy of a sheet in a new WB and then saves it as a .XLSX. With suppressing the alerts it has worked fine until yesterday. I did inspect my file name and is properly formed with .XLSX at the end.

This was posted with no response yet:
Redirecting

Is this a new bug in Excel?


1702075448418.png


Application.DisplayAlerts = False 'Don't display warning about changing file extension
NewWB.SaveAs Filename:=NewPathFile, FileFormat:=xlOpenXMLWorkbook 'Save to xlsx
Application.DisplayAlerts = True
 
I don't have autosave turned on, so maybe that's the culprit.
 
Upvote 0

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
Which version of Windows are we all on?

That dialog certainly explains the problem, but I'm not sure why not everyone has the same one.
 
Upvote 0
I don't get the issue on W10 with version 2309 build 16827.20278 64bit
I do on W11 version 2401 build 17130.20000 64bit.
 
Upvote 0
Win 10 home version 22H2 build 19045.3693
 
Upvote 0
As much as it is frowned upon, you should be able to add a line for sendkeys to keep the code working.

Just change:
VBA Code:
    Application.DisplayAlerts = False

to the following:
VBA Code:
    SendKeys "{Tab 3}" & "{Enter}"
    Application.DisplayAlerts = False

That should work for the newest 'bugged' versions as well as the versions that weren't affected.
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,240
Members
452,621
Latest member
Laura_PinksBTHFT

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top