ActiveWorkbook.save not working with Excel 2016

ExcelWombat

New Member
Joined
Dec 15, 2009
Messages
21
Since upgrading to Excel 2016 my spreadsheet now saves files to a new filename in the same folder but with an unusual filename in the format "DC3E7000" or similar with no file extension. When I change the file name to have an XLSM extension it opens and displays the saved data. The original file remains unchanged. The code I use to save the file is -

Code:
Private Sub Workbook_BeforeClose(Cancel As Boolean)
ActiveWorkbook.Save
End Sub

I have tried ThisWorkbook.save with the same result. I would stress, this works perfectly with Excel 2007, 2010 and 2013 and the changes are saved to the original file.

Any help here would be greatly appreciated.
John.
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
Further to this problem I have just discovered that it may not be a VBA problem. I just made changes to another spreadsheet and used "Save" on the "File" menu and it created a new file called "B855A000".

I have no idea what is going on here.

I'm not even sure how to post this as a problem.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,637
Messages
6,125,963
Members
449,276
Latest member
surendra75

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