VBA - Can't save .xlsm file to .xlsx - runtime error 1004

soundtrackz

New Member
Joined
Dec 8, 2023
Messages
4
Office Version
  1. 365
Platform
  1. Windows
I have many macros with this and it suddenly stopped working - displaying runtime error 1004 - can't save from xlsm file to macro-free file.
Any idea, what happened?

VBA Code:
Sub Saving()
    Dim strName As String

    Application.DisplayAlerts = False
    
    strName = ThisWorkbook.Path & "\SomeName.xlsx"
    ThisWorkbook.SaveAs Filename:=strName, FileFormat:=xlOpenXMLWorkbook
    
    Application.DisplayAlerts = True
End Sub
 
I'm on Microsoft 365 MSO (Version 2311 Build 16.0.17029.20108) 32-bit & I checked yesterday that I'm fully up to date.
 
Upvote 0

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
It fails for me on 2401, so it would appear to be an Insiders/beta issue.
 
Upvote 0
I've submitted feedback to them about it.
 
Upvote 0
The only commonality I can see then is the 64bit one (mine is also 64 bit). Without the displayalerts line, what dialog do you see? The old one with 'Yes' as the default option?

Edit: ignore that - looks like Domenic has the problem on 32 bit.
 
Upvote 0

Forum statistics

Threads
1,215,129
Messages
6,123,217
Members
449,091
Latest member
jeremy_bp001

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