ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   2003 to 2007 conversion. Unable to save workbook (https://www.excelbanter.com/excel-programming/408900-2003-2007-conversion-unable-save-workbook.html)

Ken Ellis[_2_]

2003 to 2007 conversion. Unable to save workbook
 
The following code worked in Excel 2003 but when I run it in Excel 2007 I
get the following message:

"The following features cannot be saved in macro free workbooks
.VB"

Set wbResults = Workbooks.Add(Template:=stResultsTemplateFileParam )
wbResults.Sheets(1).Name = "Test Results"
wbResults.SaveAs Filename:=stResultsFileFullname

The template file has a macro and is defined as an .xlsm file. I tried
adding '.xlsm' to stResultsTemplateFileParam but no good.
I cannot see any property for wbResults that I could set to specify the
workbook as .xlsm.

Thanks for any help.

Ken Ellis


Ron de Bruin

2003 to 2007 conversion. Unable to save workbook
 
Hi Ken

See this page about the file formats
http://www.rondebruin.nl/saveas.htm

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Ken Ellis" schreef in bericht news:fsidneCoH_KbBWXanZ2dnUVZ8qeknZ2d@plusnet...
The following code worked in Excel 2003 but when I run it in Excel 2007 I
get the following message:

"The following features cannot be saved in macro free workbooks
.VB"

Set wbResults = Workbooks.Add(Template:=stResultsTemplateFileParam )
wbResults.Sheets(1).Name = "Test Results"
wbResults.SaveAs Filename:=stResultsFileFullname

The template file has a macro and is defined as an .xlsm file. I tried
adding '.xlsm' to stResultsTemplateFileParam but no good.
I cannot see any property for wbResults that I could set to specify the
workbook as .xlsm.

Thanks for any help.

Ken Ellis



All times are GMT +1. The time now is 03:37 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com