The purpose of having forced Save-As-XLSM is so that users will not accidentally save as XLSX and lose all the programming. I found a couple pieces of code online about forced Save As XLSM. Even though the users in these posts claimed they worked, they never worked for me. I wonder if anybody know if I'm doing anything wrong. I'm using Excel 2010 on Windows 7. Thanks so much in advance for your help!
1. This piece does not do anything. If I click Save As, then pick/write the new file name to be saved at, click Save, it will just cancel the action and does nothing at all. However, if I comment out the "CANCEL = TRUE" line, it will behave exactly like #2 code below: it will prompt me to select a file with the XLSM filter, then prompt me to select the file again with a XLSX filter. After I correct the filter to XLSM and provide a new filename, it will save the new file. But it completely defects the purpose of automatically force saving in XLSM.
(original post from http://www.ozgrid.com/forum/showthread.php?t=147820)
2. This piece will first prompt the Save-As file browse window with a default "XLSM" type, but once you put in a filename and click Save, it will pop up the same Save-As file browse window again, only this time having the default "XLSX" type. If you provide the new file name and reselect to XLSM to save, it will actually do Save-As under the new name, it completely defeats the purpose of automatically force saving to XLSM.Please Login or Register to view this content.
(Original Post http://www.mrexcel.com/forum/excel-q...-workbook.html)
Please Login or Register to view this content.
Bookmarks