Full Version: Workbook extension is xls rather than xlsm
UtterAccess Discussion Forums > Microsoft® Office > Microsoft Excel
idisc
Having a bit of a problem with VBA code that worked fine under Excel 2003 but is now not working properly. Workbooks were being saved using the following code:

ActiveWorkbook,SaveAs Filename:= _
Copies & CPT & "_Extension_" & Mdate, _
FileFormat:=xlWorkbookNormal, _
CreateBackup:=False

It works OK and is being saved to the right directory, but the file extension is .xls rather than .xlsm

I'm not sure whether FileFormat should read xlWorkbookDefault or something else, to make the extension read .xlsm

Any assistance would be appreciated. Thanks.
xld
Use a fileformat of xlOpenXMLWorkbookMacroEnabled
idisc
Thanks xld, i will try that.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.