VBA SaveAs FileFormat 53???

Myriad_Rocker

Board Regular
Joined
Dec 1, 2004
Messages
67
So I have this Excel thing...well, we'll call it thing. It's rather large so I don't want to go into details but nevertheless, I have a SaveAs routine that will not work in Excel 2007 when saving with file format 52 for .xlsm. Excel 2010 will open it but Excel 2007 will not. It says the file is corrupt.

Just so we're all on the same page, I'm talking about the file that got saved.

So...if I change that to FileFormat 53, it works. But my question is, why? Everything I have found on the interwebs says to use 52!
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
According to the VBA help file in 2010:

53 is for an Open XML Template Macro Enabled
52 is for an Open XML Workbook Macro Enabled

What happens if you just use the named constant?
xlOpenXMLWorkbookMacroEnabled
 
Upvote 0
According to the VBA help file in 2010:

53 is for an Open XML Template Macro Enabled
52 is for an Open XML Workbook Macro Enabled

What happens if you just use the named constant?
xlOpenXMLWorkbookMacroEnabled
I can't do that because different versions of Excel are used across our customer base.

I could check the Excel version before going into it, though, I suppose.
 
Upvote 0

Forum statistics

Threads
1,224,607
Messages
6,179,871
Members
452,948
Latest member
UsmanAli786

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