Is there a compatibility issue between macros written for XLS, XLSX and XLSM? Will the same macro work for all workbooks?
Is there a compatibility issue between macros written for XLS, XLSX and XLSM? Will
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
There are significant differences between these formats :
.XLSis intended to be used for Excel 2003 and above, so your VBA code needs to be backwards compatible for earlier versions of Excel (<2007).XLSXis the Excel 2007 format that cannot store VBA code..XLSMor.XLSBare the Excel 2007 format that allow you to save VBA code with the workbook. As Sydenam said, the differences between these two is the way the workbook is stored.In short:
.XLSBis the binary format (equivalent to.XLSfor 2007+ version) whereas.XLSMis the OOXML format.See When should the xlsm or xlsb formats be used? for more information.
Addendum for backward compatibility
I can’t see any easy way to tell you how it can be backwards compatible, we can’t be that generic. You can see on Ozgrid the new methods and properties that were added in Excel 2007. You can also find here some tips on how to develop on Excel 2007.
The Ozgrid page will give you the new elements of Excel 2007 and then will tell you what you shouldn’t use if you wanted to be backwards compatible.